Add a mechanism for queueAdd to run a function asynchronously with a callback

queueAdd must be called like:

browser.queueAdd(function(cb) {
  do_something_async(cb);
}, function() {
  do_something_synchronously(cb);
});

The second synchronous function may be empty, but there must be a
function provided for the second argument to queueAdd for the first
function to be treated asynchronously.