Use a hash in redis instead of keys

Redis hashes are optimized into ziplists, which are more cache-performant
and compact for small sets.