Rename state with entity, and reparent orphaned entity data

Fixes #599.

Ready for discussion and review. It's pretty complex -- parallel reference to http://flapjack.io/docs/1.0/development/DATA_STRUCTURES/ is assumed, and the merge case especially gets fairly complicated depending on the possible orders of events.
So timing will be interesting, of course. If an entity is renamed before the check execution system is updated then when a check result comes in from the old named entity the old entity name will be created and a uuid generated for its ID, and it'll have all new state. When the check execution system config catches up, all will be good again, except for the unnecessary keys created afresh for the old name, which won't be able to be cleaned up. I can't think of any way around this. 

And if it's the other way around, check execution system is updated before the entity is renamed in flapjack, then the check data will we lost? Or will the check data be re-parented when the entity is renamed? I will keep reading the source...