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
Merge branch 'DDC-2692' into 2.4