Flushes the blktree/ and coins/ databases, and reindexes the
block chain files, as if their contents was loaded via -loadblock.
Based on earlier work by Jeff Garzik.
Support LevelDB memory-backed environments, and use them in unit tests.
Database-independent glue for supporting LevelDB databases.
Based on code from earlier commits by Mike Hearn in his leveldb