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.