[WIP] refactor the repository access

This pull requests addresses #

TODOs:

[X] create base structure
[ ] finish manager classes
[ ] finish Doctrine ORM support
[ ] replace direct usages of the repository
[ ] documentation
[ ] tests
[ ] Propel support (possible)
[ ] MongoDB support (possible)
[ ] CouchDB support (possible)