Crystal structure of a bacterial CNNM magnesium transporter