Implement control inversion for result handling.

Convert result handling from a self-buffered pull of bytes from
the worker to a model where the receiver knows exactly how many
bytes are needed for the next fragment in the response, delegating
the buffering/impedance-matching to the xrdssi layer. This reduces
responsibility of the czar's response-handling code and simplifies
the control flow.
Improve thread safety by adding protection mutexes.