* debug: heap fragmentation stat
* Rework method detection
- return check integral type as a result of detection instead of method type
- type-tagging instead of enable_if
* fix alias
* typo
* only need one bool_type instance
* Move heap debug into HeapStats header
- don't show fragmentation stats on the first call
- prettify fragmentation display
- pack function params into helper struct
- naming
* pass external flag instead
* add missing prototypes
- 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