walletdb: move IsWalletLoaded to walletdb.cpp
Summary:
Partial backport (3/5) of core PR19290:
https://github.com/bitcoin/bitcoin/pull/19290/commits/25a655794a0c495332dadedd88b87d694c1077c2
Depends on D8612.
Test Plan:
ninja all check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D8613