Fix a problem with JSON::PP::Boolean usage.

Change any type constraint that expects a Bool into Bool|Object
because of a difference in how JSON::PP maps booleans.

Change some code to map both JSON::XS::Boolean and JSON::PP::Boolean
to one and zero.