releasing the lock only after transaction completion

Fixing SingleSessionCommandService thread safety issue when it's not ghe JTA transaction owner. This fixes the issues seen at  https://issues.jboss.org/browse/JBPM-3814