In vitro degradation of AZ31 magnesium alloy coated with hydroxyapatite by sol–gel method