HHH-9106 : Merging multiple representations of the same entity merged

(cherry picked from commit 70532259faa14064cff8263cbb7ad6d82d607892)

Conflicts:
	hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java
	hibernate-core/src/main/java/org/hibernate/event/internal/DefaultMergeEventListener.java
	hibernate-core/src/main/java/org/hibernate/event/internal/EventCache.java
	hibernate-core/src/test/java/org/hibernate/event/internal/EventCacheTest.java
	hibernate-core/src/test/java/org/hibernate/test/ops/AbstractOperationTestCase.java
	hibernate-core/src/test/java/org/hibernate/test/ops/Category.java
	hibernate-core/src/test/java/org/hibernate/test/ops/Hoarder.hbm.xml
	hibernate-core/src/test/java/org/hibernate/test/ops/Hoarder.java
	hibernate-core/src/test/java/org/hibernate/test/ops/Item.java
	hibernate-core/src/test/resources/log4j.properties
HHH-9239 HHH-9240 : FailureExpected test cases when merging entity copies with dirty collections

(cherry picked from commit c7c5b015c134df993de4105a2bc3e70d7e14ad68)
HHH-9106 : Merging multiple representations of the same entity

(cherry picked from commit 2daaf9a1965b70897928ea222ea8708acaad3bbd)
HHH-9106 : Merging multiple representations of the same entity (entitymanager test cases)

(cherry picked from commit 055b0cacaec4fbb136a1fc592fa00cb7e950eb61)
HHH-9106 : Merging multiple representations of the same entity