Implement support for using either flash or EEPROM

Either flash or EEPROM can be used for storing persistent image data.