Create new wallet databases as directories rather than files
Summary:
This change should make it easier for users to make complete backups of wallets because they can now just back up the specified `-wallet=<path>` path directly, instead of having to back up the specified path as well as the transaction log directory (for incompletely flushed wallets). Another advantage of this change is that if two wallets are located in the same directory, they will now use their own BerkeleyDB environments instead using a shared environment. Using a shared environment makes it difficult to manage and back up wallets separately because transaction log files will contain a mix of data from all wallets in the environment.
Partial backport of core PR11687 (commit be8ab7d)
https://github.com/bitcoin/bitcoin/pull/11687/commits/be8ab7d082228d09ca529d1a08730d7d5aacb0ed
Test Plan:
Read the release notes
make check ./test/functional/test_runner.py wallet_* feature_config_args
Play around with the -wallet option.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Maniphest Tasks: T651
Differential Revision: https://reviews.bitcoinabc.org/D3105