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.
this method needs a lot of logging at warn level I think to articulate what it's doing