Gradient doping Mg and Al to stabilize Ni-rich cathode materials for rechargeable lithium-ion batteries