TOMEE-798 handling re-creation of queries object when not under a transaction to be sure the query uses the right em and then the context is correctly closed after the invocation

git-svn-id: https://svn.apache.org/repos/asf/tomee/tomee/trunk@1456967 13f79535-47bb-0310-9956-ffa450edef68