Inhibitor-doped sol–gel coatings for corrosion protection of magnesium alloy AZ31