TMDM-8011: "Sequence of autoincrement value is broken when multiple MDM servers share same database"

Core changes
  * Adds ability to configure lock strategy when reading instances for update (pessimistic strategy).
  * Updates to MDM Transaction API to set lock strategy to apply.
  * Adds documentation (Javadoc) on lock types.
  * Workaround Hibernate's limitation relative to use of projections + joins + pessimistic locks (https://hibernate.atlassian.net/browse/HHH-3313).
  * Disables "in clause" optimization when using lock_upgrade (since optimization raises HHH-3313 problem).

AutoIncrement using DB locks
  * Adds new implementation of AutoIdGenerator leveraging introduced core changes (includes fix initialization of first time id for a given type and id (re-enter method to obtain lock onto AutoIncrement)).
  * Workaround Hibernate's limitation relative to use of projections + joins + pessimistic locks (https://hibernate.atlassian.net/browse/HHH-3313).
  * Adds unit test to reproduce issue.

(https://jira.talendforge.org/browse/TMDM-8011)

(cherry picked from commit d9a8cc3b5a3d6127fff06397c8f8ceda9893b0c6)

Conflicts:
	org.talend.mdm.core/src/com/amalto/core/storage/hibernate/SelectAnalyzer.java
	org.talend.mdm.core/test/com/amalto/core/query/SystemStorageTest.java
TMDM-8011: "Sequence of autoincrement value is broken when multiple MDM servers share same database"

Refactoring of auto generated id.
Allows future configuration key (TBD) to enable concurrent safe implementation for auto increment.
(https://jira.talendforge.org/browse/TMDM-8011)

(cherry picked from commit b276e6601a296526b56a4dfb24c8c5a040da5575)

Conflicts:
	org.talend.mdm.core/src/com/amalto/core/save/context/DefaultSaverSource.java
	org.talend.mdm.core/src/com/amalto/core/save/context/StorageSaverSource.java
	org.talend.mdm.core/src/com/amalto/core/save/generator/StorageAutoIncrementGenerator.java
TMDM-8011: "Sequence of autoincrement value is broken when multiple MDM servers share same database"

Sync key name from in-memory implementation and SQL implementation.
Adds ability to configure clustering mode in mdm.conf.
Ensure in-memory auto increment state is correctly saved during server shutdown.
(https://jira.talendforge.org/browse/TMDM-8011)

(cherry picked from commit 6480e7a33064aa1d803e5e8540b74c04c909be4c)

Conflicts:
	org.talend.mdm.core/src/com/amalto/core/server/Server.java