(chainbase) more rigorous clean shutdown detection for mapped DB
(chainbase) more rigorous clean shutdown detection for mapped DB

add a flag within the memory mapped DB that indicates if the DB was safely flushed to disk. Ensure that the rest of the DB is entirely out to disk before setting the flag indicating that the DB is clean.

This is not entirely an ideal implementation because boost's managed_map_file doesn't seem to expose a synchronous flush. The only way of doing a synchronous flush is via the mapped_region but I have not been able to find a public accessor that can get to this on a managed_map_file. This also means it isn't possible to perform this action on Win32 at the moment.

EOSIO/eos,EOSIO/eos,EOSIO/eos,EOSIO/eos,EOSIO/eos