* Properly define the callback time of a write/commit as the time when
the pipe is available again for further writing.
* Refuse commits when writes are pending; instead, enforce a strict
order of finishing writes before committing, which makes sense since
consecutive writes are ordered this way already.
* Properly support callbacks for writes and for commits.
* Define the synchronous APIs in terms of waiting until the callbacks
for equivalent asynchronous functions are invoked (plus initial
waiting for pipes to be ready).