Four people have died and more than 500 been injured after a chemical explosion at Iran's largest port, according to state media.