Cache entity and check name <-> id lookups

Including some code to dynamically upgrade previous Flapjack data if needed.

It's a bit hacky, but anything which removes usage of Redis's `KEYS` command has to be an improvement.

Hopefully fixes #674.
Ah, oops -- we need to restore that and remove the `:driver => :hiredis` part in this file then. Sorry, thought it was something else.