[PLINK-347] - Transaction is not being shared by different operations within the same thread.

This change is about using a ThreadLocal to share the same EntityManager between invocations from the same thread and transaction.

The JPAIdentityStoreService may create an embedded  EntityManagerFactory based on a data source provided by the user when configuring the IDM subsystem. In this case, is up to the subsystem to properly manage EntityManager instances in order to perform IDM operations.

The same applies to transactions, the subsystem uses JTA and it can begin or join the actual transaction. 

This change improves how EntityManager is created and also how transactions are managed by the JPAIdentityStoreService.
After discussing with Scott, the JPA subsystem already provides a similar and better solution for this. We can reuse a lot of code from there in order to properly manage EM and TXs.

We also decided to auto-commit transactions if they were started by the service.