Molecular Basis of Metal-Ion Selectivity and Ultrasensitivity of Metalloregulatory Proteins