Biogeochemical cycles of carbon, sulfur, and free oxygen in a microbial mat