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.
we're using em-synchrony in this file, is it already being pulled in by something else?