Using atomic mongodb commands to implement a FIFO queue.