Fixed race condition in JPA async commit

We now commit JPA transactions asynchronously after the Java result
future is redeemed.  There is a race condition though if the next
request (eg, a request for the resource that was just updated)
comes in before the transaction is actually committed.  This
fix causes the transaction to be committed on the same thread as the
operation, ensuring that it is committed before the response is sent.