fix zd864: long HTTP header lines not handled properly

Due to Erlang bug OTP-9389, the handling of HTTP request header lines
that exceed the size of the gen_tcp receive buffer is broken when
using {packet,http} and {packet,httph} modes.

Modify mochiweb to work around this bug by using {packet,line} mode
instead to collect request header lines and then using
erlang:decode_packet to parse them. Using {packet,line} allows us to
avoid reading past the headers into the request body (if present),
since doing that would require us to carry the body data from the
header handling functions over into the body handling functions, which
could be a pretty intrusive and complicated change.

Also add regression unit tests that verify that long HTTP request
lines and long HTTP header lines are handled correctly.
HttpError parses are returned as normal packets, not error tuples.
Merge pull request #2 from basho/bz1291-http-error-packets

BZ1291 HttpError packet parsing fix