Explicitly abort the extractor process write transaction when the daemon quits
The extractor notices when the daemon wants to quit, as the daemon first closes the write (control) pipe.
This is verified by the test added in the first commit.
On the next event loop iteration (i.e. after each file) the extractor should quit, and while doing so it should abort the pending transaction.