Design of the double-layer biocompatible coating on AZ31 magnesium alloy for highly effective corrosion resistance