Origin of microbial biomineralization and magnetotaxis during the Archean