[backport#15986] Factor out checksum checking from descriptor parsing
Summary:
https://github.com/bitcoin/bitcoin/pull/15986/commits/104b3a5069c937383e6f88f2f3fb804ef61b208f
Partial backport of Core PR15986
Test Plan:
ninja check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D6622