Structure, properties and regulation of magnesium transport proteins