Refactoring and upgrade HTTP parser to the one used in zedshaw/mongrel2