Global markets have reacted sharply after Iran declared the Strait of Hormuz closed as oil prices climbed and stocks fell.