Multiple invokation of listeners on PreFlush event

Only lifecycle callbacks and entity listeners should be triggered here. The preFlush listener event is already triggered at the beginning of commit()
Added unit test
removed unused use statements, fixed typo and group tag
Listener class prefix
Remove left over ElementCollection code.
Fix non initialized association proxy
Merge pull request #883 from FabioBatSilva/hotfix-slc

[DDC-2862] Fix non initialized association proxy
Fix cache misses using one-to-one inverse side
Merge pull request #884 from FabioBatSilva/slc-patch1

[SLC] Fix cache misses using one-to-one inverse side
Add an example to doc of YAML mapping
Merge pull request #888 from entering/docs-yaml-mapping-improve-example

Add an example to doc of YAML mapping
add general IDENTITY generator type support for sequence emulating platforms
Allow to not generate extra use

For case when we not generate annotation (by default at doctrine orm:generate-entities) allow to not generate extra use for it - 
```php
use Doctrine\ORM\Mapping as ORM;
```
For example if generate entities for my project that use only dbal in pord but use orm for generate entities in dev mode.
Merge pull request #891 from spolischook/patch-2

Allow to not generate extra use
Merge pull request #890 from deeky666/DBAL-563

[DBAL-563] Add general IDENTITY generator type support for sequence emulating platforms
autoGenerate arg from bool to int

For using all four modes of proxies generation, change the 4th arg of
ProxyFactory's constructor to integer
Format code
Merge pull request #893 from yktd26/master

autoGenerate arg from bool to int
Merge pull request #794 from stefankleff/patch-1

Multiple invokation of listeners on PreFlush event
Merge branch 'master' of https://github.com/doctrine/doctrine2 into lazy-criteria