[CMAKE] Fix Qt tests when the wallet is not built
Summary:
This diff makes the addressbooktests.cpp to only build when the wallet
is enabled.
Test Plan:
cmake -GNinja .. -DBUILD_BITCOIN_WALLET=OFF ninja check
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D4719