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 ensures the transaction is committed before the response is sent.
Merge pull request #1151 from jroper/jpa-transaction-commit

Fixed race condition in JPA async commit