[trivial] Making debug output more consistent
[bug] When filtering headers, body & headers can arrive out of order. Test for this, and nasty hack to fix

The nasty hack is a usleep call just after writing the header, to try
and make sure the header always comes out first. But this leaves the
race condition in place without really fixing it.

Worse, the HTTP message might be totally invalid (eg Content-Length
might no longer correctly count the bytes in the body). So rethinking
this generally...