Merge pull request #17 from moneromooo-monero/blockchain

db_lmdb: catch attempt to remove block from an empty blockchain
db_lmdb: do not give the group database write permissions
update comments to reflect changed code
Fixes a bug with getting output metadata from BlockchainDB

Thanks to moneromooo-monero for spotting the bug.
blockchain_converter: add --testnet for converting testnet blockchain
db_lmdb: remove redundant checks
db_lmdb: fix global index calculation off by 1

This finally fixes raw tx being accepted by the daemon.