Entity id generation bound to engine.

Removes the need for the static field nextId in Entity.
Just keep in mind, that the entity id is first generated when added to the engine.