Adaptation of spherical multicellular magnetotactic prokaryotes to the geochemically variable habitat of an intertidal zone.