queueWrite
Queues a debounced asynchronous write.
A failure is reported rather than thrown: there is no caller left to hand it to by the time the write runs, and because the write is atomic the previous file is still intact, so the next save simply tries again.
Parameters
contents
Supplies what to write. It is called when the write runs rather than when it is queued, so a burst of changes costs one snapshot and one file write instead of one of each.