Doctrine improvements

- updated doctrine/orm from 2.3.* to 2.4.*
- EntityManager can be obtained now with "new EntityManager()" instead
of "EntityManager::getInstance()" thanks to class extending.
- created config/cli-config.php for Doctrine CLI tool
- added proxies to improve performance