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
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
don't rely on gc_collect_cycles for HHVM
[GH-855] fix CS
[DDC-2803] Fix error in documentation.
Merge branch 'master' of https://github.com/doctrine/doctrine2 into lifetime-cache
Allow region config to override mapping