[WFLY-3534] - 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.
The "if (Status.STATUS_COMMITTED != status)" check might not be needed, as you probably could close the entity manager for both the rolled back and committed cases.  There is also the case of transaction time-out that is not solved yet (with regard to concurrency).