fix Issue #338 - keep-alive HTTP requests only served after 40ms

- A deadlock is caused by Nagle's algorithm + delayed ACK and
  the write+write+read pattern (resp header + body + next req)
  when serving 2 HTTP requests on a keep-alive connection.

- Resolved by buffering smaller writes so that responses don't
  get split unnecessary, i.e. blocking in write iff more than
  4kB is buffered.
Merge pull request #338 from dawgfoto/fix338

regression requests on keep-alive HTTP connections only served after 40ms