added TypeFactoryInterface as constructor parameter for EntityManager.php