No longer ever reuse keypool indexes
Summary:
This fixes an issue where you could reserve a keypool entry, then
top up the keypool, writing out a new key at the given index, then
return they key from the pool. This isnt likely to cause issues,
but given there is no reason to ever re-use keypool indexes
(they're 64 bits...), best to avoid it alltogether.
Backport core's PR10795
Depends on D1045
Test Plan:
make check ./test/functional/test_runner.py --extended
Reviewers: #bitcoin_abc, matiu
Reviewed By: #bitcoin_abc, matiu
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1047