The Chemistry of Fluorine-bearing Molecules in Diffuse and Dense Interstellar Gas Clouds