- store system crash counter and reset reason in rtcmem instead of eeprom
- store relay state mask in rtc in addition to the eeprom
- store relay state in eeprom only when boot mode requires it
- simplify relay state mask calculation / reading using std::bitset
- light state save and restore
- energy total save and restore