For decades, the military treated climate crisis as a threat. Now it’s backing away from plans to protect people and bases from extreme weather