Mercury-ion optical sensors