[cmake] Fix dependencies for functional test targets
Summary: They are wrong :)
Test Plan:
On master:
ninja clean ninja check-functional
Fails because bitcoin-wallet is not built.
With this patch:
ninja check-functional
Works.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5763