Change wallet_encryption.py to use signmessage instead of dumpprivkey
Summary: Backport of Core PR16528 [38/43] : https://github.com/bitcoin/bitcoin/pull/16528/commits/388ba94231f2f10a0be751c562cdd4650510a90a
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D8488