Sweden joins NATO as war in Ukraine prompts security rethink