Fix IO related deadlock

Read responses to commands issued to the redirector process only once we know that the request was parsed at the other end and a response sent.

Merge includes patches that start adding improvements to ICAP parsing
Yes, but that's in an example script that always provides the body :)