Improve handling of INVALID in IsMine
Summary:
- Do not expose invalidity from IsMine
- Add additional unit tests for invalid IsMine combinations
- Add P2WSH destination helper and use it instead of manual hashing
This is a backport of Core PR13491
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D6381