JWK: add ToJSON instance for Key

Add a ToJSON instance for Key (along with instances for a bunch of
other types used in Key).