Efficient queue manager/processor in node.js