Implement promises for QueuePlugin (valid for GQuery and Effects). Fix delay method in QueuePlugin which was executing functions twice, and fix dequeue as well. Added tests