By the time the colonization of mars is going to be an achievable reality all of those things would not be an issue.
Large impact protection and geo-engineering are considerably easier efforts than colonizing mars considering just how hostile the environment is (even the martian dust is extremely poisonous to humans).
You are effectively going to live on a planet with no effective atmosphere, no magnetic field, with extreme temperatures and plenty of natural hazards.
The level of geo-engineering required to build martian colony which is both self sustainable and could serve as a lifeboat for the human species is currently insurmountable, we haven't even sent a single living thing to mars, we haven't sent a single person, nor we returned them safely.
We have not studied the effect of long term exposure to the martian environment and we have virtually no clue on what is going to be required in practice to enable large number of humans to live there for eternity.
And most importantly everything on that list with the exception of a gamma ray burst (which would fry mars also) is going to live earth considerably more liveable and hospitable to humans.
If you can build a self sustaining colony on Mars you can build on on earth even after a mega impact event, supervolcano, another ice age or extreme pollution.
Earth has an atmosphere that at best would require a rebreather, it has a magnetic shield that protects you from radiation, you won't die or suffer serious health effects because you were exposed to sand, and in any case the temperatures would still remain considerably more hospitable to humans than they'll ever be on mars.
Earth also has a diverse biome, which means regardless of what is going to happen life would still continue to exist in one shape or form, if nothing else this would constantly provide humanity with food, energy, and oxygen.