Improve EEPROM and shutdown handling

- write to EEPROM much faster by writing only changed bytes
- save power during shutdown to have more left for EEPROM saving