Checks that all of the one byte type keys are actually one byte and
throw an error if they are not.
Add tests for each type to check for this behavior.
This is a partial backport of Core PR13721 : https://github.com/bitcoin/bitcoin/pull/13721/commits/41df035ee1694715ee1e0f89b08ac8c73987807b
Depends on D4454