The US will leave the United Nations health agency in 12 months' time and stop paying billions of dollars towards its work around the world.