HHH-8654 - Ability to get noitified of interesting Session events
(cherry picked from commit f073b979d4ae647b9ec3c1fd9c0dc44a09dac5ad)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/action/internal/EntityInsertAction.java
	hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java
	hibernate-core/src/main/java/org/hibernate/cache/internal/StandardQueryCache.java
	hibernate-core/src/main/java/org/hibernate/cache/spi/UpdateTimestampsCache.java
	hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java
	hibernate-core/src/main/java/org/hibernate/cfg/Settings.java
	hibernate-core/src/main/java/org/hibernate/cfg/SettingsFactory.java
	hibernate-core/src/main/java/org/hibernate/engine/internal/TwoPhaseLoad.java
	hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/internal/AbstractBatchImpl.java
	hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/ResultSetReturnImpl.java
	hibernate-core/src/main/java/org/hibernate/engine/jdbc/internal/StatementPreparerImpl.java
	hibernate-core/src/main/java/org/hibernate/engine/loading/internal/CollectionLoadContext.java
	hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java
	hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java
	hibernate-core/src/main/java/org/hibernate/engine/spi/SessionImplementor.java
	hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java
	hibernate-core/src/main/java/org/hibernate/id/enhanced/TableStructure.java
	hibernate-core/src/main/java/org/hibernate/internal/AbstractSessionImpl.java
	hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java
	hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java
	hibernate-core/src/test/resources/hibernate.properties
	hibernate-core/src/test/resources/log4j.properties
HHH-8654 - Ability to get notified of interesting Session events
(cherry picked from commit 1e74abf5118cccd0f2c6e71de76be36d50453576)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/cfg/SettingsFactory.java
	hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java
	hibernate-core/src/main/java/org/hibernate/engine/spi/SessionImplementor.java
	hibernate-core/src/main/java/org/hibernate/internal/AbstractSessionImpl.java
	hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java
	hibernate-core/src/test/resources/log4j.properties
HHH-8654 - Ability to get notified of interesting Session events
(cherry picked from commit 449c55836515835a152d95996eae6a7a1e90798b)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java
Whitespace and style fixes (only)
(cherry picked from commit 0ba7c607780f5b48fc8958cabd1105e235c3dd61)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/loader/Loader.java
	hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
HHH-8681 NonNullableTransientDependencies should initialize identityMap lazily
(cherry picked from commit 46ed0bd7108c233e4e39e5ed884719be13a37704)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/engine/internal/NonNullableTransientDependencies.java
HHH-8680 Relax synchronized block in TableGenerator#generate
(cherry picked from commit adbd987fff7bb3a00a5b407741fd8a4270763f19)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/id/enhanced/NoopOptimizer.java
HHH-8698 ColumnNameCache wraps and unwraps int to Integer multiple times
(cherry picked from commit a0c0ea5361007c21563f5c5ca69489943eb62037)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/engine/jdbc/ColumnNameCache.java
	hibernate-core/src/main/java/org/hibernate/engine/jdbc/ResultSetWrapperProxy.java
HHH-8679 Relax synchronized block in Loader#wrapResultSetIfEnabled
(cherry picked from commit 8a0cf23f1f8a09dcec0c500f1504c33975f15ba4)
HHH-8698 ColumnNameCache wraps and unwraps int to Integer multiple times
HHH-8680 Relax synchronized block in TableGenerator#generate
HHH-8682 org.hibernate.engine.spi.EntityKey consumes a lot of memory
(cherry picked from commit 2235c43eaae36cc02f51276b69bd258d4ee17174)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java
	hibernate-core/src/main/java/org/hibernate/engine/spi/EntityKey.java
	hibernate-core/src/main/java/org/hibernate/persister/entity/EntityPersister.java
HHH-8704 - ManyToOneType#scheduleBatchLoadIfNeeded creates EntityKey instances even if absolutely not necessary
(cherry picked from commit 7f82763843aa0d2fab4f086b7d08b4622fc65728)
HHH-8703 - Remove NonFlushedChanges api
(cherry picked from commit d6fa2b286447e17f926906cf6867e508d6a5b87e)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/engine/spi/NonFlushedChanges.java
	hibernate-core/src/main/java/org/hibernate/internal/NonFlushedChangesImpl.java
	hibernate-core/src/test/java/org/hibernate/test/nonflushedchanges/CreateTest.java
	hibernate-core/src/test/java/org/hibernate/test/nonflushedchanges/MergeTest.java
	hibernate-core/src/test/java/org/hibernate/test/nonflushedchanges/SaveOrUpdateTest.java
HHH-8703 Remove need to support EntityKey de-serialization without having access to a SessionFactory
(cherry picked from commit 9a3b1417c63662c5fbd212ae615c7d5168b3b7c4)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/persister/entity/EntityPersister.java
HHH-8686 FumTest hangs on mysql55
[HHH-8707] Add support for oracle12c, postgresql92, postgresplus92, db2-10, mssql2012 to DatabaseAllocator