Nonvolatile Magneto-Thermal Switching in MgB2