[BZ-1044529] fix memory leak caused by kbase.getStatefulKnowledgeSessions()