Various changes to break out the request parsing state and remove extra malloc/copies
* Create a HttpParser structure to encapsulate the current parsing state
* Add some functions to return the current request/header length with some checks
(which are expensive and should be inlined later once the code is proven to
work.)
* Use the connection buffer rather than a temporary buffer to parse the request
headers, saving a malloc and copy (the 'prefix' buffer)