Resolve #350: Detect corrupted database and recreate it

If leveldb reports that the database is corrupted now, it will be
deleted and rebuilt from scratch.
Merge branch 'master' of github.com:BitShares/bitshares_toolkit