A queueing system for the cmd module to limit the number of open handles (closes #981)