Origin of pH Variations and Inorganic Carbonates in Pelagic Sediments