Smart composite antibacterial coatings with active corrosion protection of magnesium alloys