Biodegradable resistive switching memory based on magnesium difluoride.