Fix -- flash chip status masks moved to flash.h
Initial flash logging support.

Very simple data logging to flash:
- we sequentially log raw TBeaconNgTracker to a RAM-based ring buffer.
- We periodically check the buffer and flush it to flash if it is full
above a fixed threshold.
- We only use sector 1 of the flash chip (pages 1024-2048).
- On boot, if we find a valid signature in the flash chip, we dump to
serial all non-empty pages, then we sign the chip and erase pages
1024-2048.