Try to hide CDB/bitdb behind CWalletDB.
This is a first chunk of changes (does not cover everything to avoid an oversized PR).
Prepare for full wallet database abstraction which is required for smooth migration to a different wallet database format (must be supported in parallel).
We probably shouldn't stay forever with Berkley-DB4.8.