Hypothetically speaking, if an extinction level asteroid/meteor impact was known to occur in ~25 years time, what realistic options does humanity, and life in general on Earth, have?
Could we feasibly design a space operation to alter the course of or destroy the object?
Yes. We either plop down mass drivers on it, chemical thrusters, nuclear thrusters, bomb it so the orbit shifts, do anything ASAP to alter its course with as little D/v tax as possible. Because the closer it gets, the more D/v it's going to cost. Basically we need to chuck everything at it. A solar sail, nuclear bombs, add mass drivers, everything. But it can be done. As long as it misses, it misses. And it needs to miss - not just be blown up and keep the same orbit, that just means roughly the same amount of destruction, just over a bigger area. It needs to have its orbit changed. But it's doable.
Is it possible to sustain some remnant of life in bunkers/protective shelters for the amount of time that would be needed for the environment to return to a habitable state? Do we have the technology/capacity to store/create enough energy and perishable supplies for this to happen?
...Yes, actually. Now I'm a bit biased. I come from survivalist militia stock. I spent most of '99 preppin' for Y2K and then '01+ after 9/11 in bunkers. Just get the nation to subsidize Mountain House, hook up a nuclear reactor, and keep digging in mountains somewhere, this is the simplest option. The Bunkers in...Armageddon, was it? Totally doable. You nationalize everything, you put the world on war footing, you shove people down there, as much as possible. This is the simplest option, and can be done concurrently with the orbit changing mission above - have NASA and ESA and CSNA and ISRO and Roscomos work on altering the orbit, everyone else doesn't just sit around, they make vaults.
It won't be comfortable, however.
Last I heard, the most a submariner was down in the depths, back to back, was around 120 odd days. Four months. People have been in space for a year and a half or more, but are always doing something and talking to a living world.
Now, theoretically, you can stay down there for a longer time, but it's going into uncharted territory real fast. I hope the government leaves them construction equipment to keep on expanding the base, stock it full of teachers, give everyone courses, anything to keep them occupied.
Could we feasibly design any sort of space faring colonization mission or long term "housing" in space or on a spacecraft?
I'm gonna say
No. Not without our tech. We don't have a handle on ECLSS yet, nor anything more than just making, basically, a bunker, and putting it on the Moon or Mars (Just do the Far side of the moon). And for what? If you can make a nuclear-solar powered bunker-in-a-box, just do it here. A bunker on earth for 10 years is far more preferable than a bunker on the Moon for a year.
Or would we have to resort to launching a probe containing the artifacts (and maybe DNA) of human society for some alien race to find in the future, ala The Inner Light?
A complete waste of time. Better spent on shoring up defenses here or focusing on a more active mission.
Would we be doomed to hoping that a small segment of the population survives and hopefully persists long enough to rebuild civilization as we know it?
If it's a planet killer, many will die. Even in the developed world. It's impossible to shove everyone down there, or support them. I would say a few million, at most. People will try to make it through on cans in backyard bunkers, and if the dust subsides within two, three years, they can make it. But not much longer. The more ornate bunkers can make it a few decades (Mountain House has a shelf life of thirty years...mmm), but the sooner they come out, the better, while using the Bunkers as new capitals and cities to spring out from. But most people are goners. Starvation, the breakdown of logistics, crime, warfare...but humanity, as we know it, technologically, can survive. It just depends on how much we really give a damn about saving it.
What if we had 50 years, does anything change?
In 50 years? Certainly. However at that point malaise and economic ups and downs have their way. Oh, at first people will build bunkers, look into space tech, but then it becomes someone else's problem, funding dries up. A few missions. Then when it's 10, 5 years away people care again.