Add idle() function to determine if the queue has any work

Added a quick function to be able to tell if a queue has anything left to do. Useful to quickly check a queue state before terminating a process. If idle() returns false, a drain function can be added, otherwise exit immediately.