add clear function to keyring to clear the database.
refactor some code so we reuse the utxo management code from bitcoinjs-lib and clean up controllers/wallet a little bit.