[tests] move generate_wif_key to wallet_util.py
Summary:
generate_wif_key is a wallet utility function. Move
it from the EC key module to the wallet util module.
This is a backport of core#19239
Backport note: the revert commit is not relevant, we haven't backported core#19230
Test Plan: ninja check-functional-extended
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9934