[BZ-1049367][BZ-1049571] invoke ReteWorkingMemory.evalQuery method when evaluating a query in rete mode
(cherry picked from commit dacb3774fd19f7560d1431b8d7176223ead54d3a)