Fix a race condition in RequestHandlerTest and a typo in FileBackedPipe
Bump the 'processed' counter after handling a request, not before, in order to make some unit tests easier.
Mark application processes as available for request processing immediately after they're done sending the response,
instead of after having sent the entire response to the client.