A simple but formal javascript queue.