Added IEntityFactory (with DefaultEntityFactory) used in Repository and Entity (BC break)
Refactored internals and fixed tests
Done various implementation improvements
Improved exceptions messages
Merge branch 'entityFactory' into develop