Implemented validate_domain() and logout().

Also made RegistrarName._request_json() make sure all JSON responses are
a dictionary at the top level.