The mechanisms of Mg2+ and Co2+ transport by the CorA family of divalent cation transporters.