Add a facility to parse and validate script bitfields.
Summary: As per title. Bitfield are little endian and has a size proportional to the number of bits they represent. The decoder validates that there are no out of bound bits.
Test Plan: Added unit tests.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D3735