Refactor sighash type test to go through every value possible in a transaction's signature.
Summary: This simplify the test case greatly. Also rename hasSupportedBaseType into isDefined and other small refactoring of the SigHashType class.
Test Plan:
make check
Reviewers: #bitcoin_abc, schancel
Reviewed By: #bitcoin_abc, schancel
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1313