The world's nine nuclear-armed states spent a combined total of $471bn over the past five years on weapons.