[backport#16227 3/8] Move HaveKey static function from keystore to rpcwallet where it is used
Summary:
https://github.com/bitcoin/bitcoin/pull/16227/commits/a913e3f2fbeb1352fc66f334d4f5f7332ea89ad7
Depends on D6554
Partial backport of Core PR16227
Test Plan:
ninja check
Reviewers: #bitcoin_abc, nakihito
Reviewed By: nakihito
Differential Revision: https://reviews.bitcoinabc.org/D6555