Cycling of carbon, sulfur, oxygen and nutrients in a microbial mat