Implement createTaskRunner({ concurrency }) for a small background worker. It returns { submit, shutdown }.
submit(task) queues a zero-argument async task and returns a promise for that task's result. Run at most concurrency tasks at once, in FIFO start order. Once shutdown() is called, new submissions must reject, while already queued work is allowed to finish. The shutdown promise resolves only when all accepted work has settled; an individual task failure must reject its own promise without preventing the queue from draining.
Reject invalid concurrency values.