Diagnose unsuitable outputs in lockunspent().
Summary:
Fixes "lockunspent returns true even for non-existent outputs"
Backport of core PR11087
https://github.com/bitcoin/bitcoin/pull/11087/files
Test Plan:
make check ./test/functional/test_runner.py wallet_basic
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D3420