extension: add an entity_state_machine,

based on the article http://www.richardlord.net/blog/what-is-an-entity-framework
and its implementation for Ash.

Can you review it, I thinks there some possible improvement ?

I use some internal method of Bag like [], some the code should be in the same library.