unification of persistence and transaction handling for jbpm and human task

(cherry picked from commit a303da17b57405c037da0ce97cf517b9a6c9540d)
fix for usergroupcallback and userinfo in hosted mode and tomcat

(cherry picked from commit 797701a8c1cbec48c62d44c0c077f3f4301eb87d)