Merge pull request #15 from moneromooo-monero/blockchain

many const-correctness changes and code quality enhancements.  minor bugfix on block removal.
Merge pull request #16 from moneromooo-monero/blockchain

db_lmdb: factor all the log+throw code paths
db_lmdb: catch attempt to remove block from an empty blockchain

It would probably have thrown when not finding a block at
height 2^64-1, but better make things clear.
db_lmdb: do not give the group database write permissions