SgQueryEngine fix queue bug poping newest items first not oldest

The worker thread was popping the newest search jobs in the queue
instead of the oldest.