Some database/-related recovery improvements

* After clean shutdown, delete the database/ subdir. This means upgrading/changing the BDB dir won't kill you anymore because of incompatible logs.
* In case opening the database environment fails, move database/ to database.$TIMESTAMP.bak, and try again.
* Do not advise the user to nuke his datadir anymore - there's no point in doing so (closes #2488).
* Drop double opening of the environment (includes #2333).