Perform a factory reset of the device.