Refactor signature encoding checks
Summary:
Isolate ECDSA-specific parts in preparation for Schnorr.
Next steps would be:
- Disallow 64 byte ECDSA signatures in CheckRawECDSASignatureEncoding when SCRIPT_ENABLE_SCHNORR flag is set (D2469)
- Add Schnorr-specific functions for checking signature encodings
Test Plan: make check
Reviewers: markblundeberg, deadalnix, #bitcoin_abc
Reviewed By: markblundeberg, deadalnix, #bitcoin_abc
Subscribers: teamcity, schancel
Maniphest Tasks: T527
Differential Revision: https://reviews.bitcoinabc.org/D2477