Many minor optimizations

Had some free time the last days, so I made some minor optimisations:

* Added code doc-blocks
* Documented api methods with ```@api```
* Made some tiny refactoring in the EntityManager and the Queries
* Fixed code-style issues to complain [PSR2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
* Changed identifiers from strings to constants in Meta\Property
* Tested some edge-cases in the Repository and the Events

There are almost no changes to functionality, but IMHO this helps understanding the code and increases maintainability.