Ensure that the encode and decode are symmetric

It's difficult to build a non brittle `redis_key` function when
sometimes receives a hash of symbols and sometimes receives a
hash of strings (a decoded JSON from Redis).