test(HTTPError): Test to_json helper

Update the error serialization test so that it tests to_json, not just
to_yaml. Remove the dependency on OrderedDict in the same test.