change api.supports_hash to take a hash class rather than a str

* This change means hash class names will be byte strings and we no
  longer need to encode to ascii on hashobject.name in
  create_hash_context