httpd: better protocol compliance, logging protocol errors

* replacing misleading 5xx status code on client-side protocol error with
  rf2616 correct 4xx status code
* supporting 65536-bytes lines rather than only 1024
* ending lines with \r\n rathern than \n
* supporting any space-tab combinations as separator on request line
  rather than one and only one space
* logging 4xx status codes with additional info on protocol error