Add (optional) BIP62 rule checks

This implements rules 1 through 6 from BIP62, as a pre-requisite for BIP62 support in Toshi. These checks are all optional and are only performed when relevant options are specified in the call to verify_input_signature().