From the time his brain cancer was diagnosed 15 months ago, Senator Kennedy spoke of having a “good ending for myself.”