[wallet] Close bdb when flushing wallet. (John Newbery)
Pull request description:
bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true.
https://github.com/bitcoin/bitcoin/pull/15357/commits/dfbf117bbb82c76c8cb60dba73ae7d653e3b8348
---
Backport of Core [[https://github.com/bitcoin/bitcoin/pull/15390 | PR15390]]