Added an interface to change the queue-popping function in KTDataQueueProcessor, including with signals/slots.
Fixed problems in the logic from the previous commit.