Fix header parsing to compare HTTP header field names case
insensitively. This fixes the problem where responses get incorrectly
marked as errors if the response header field name case doesn't happen
to match to what is in the code.

Also compare connection and transfer-encoding tokens case insensitively.

(Reference: RFC 2616: header field names are not case sensitive.)

Co-authored-by: Stefan Bühler <stbuehler@web.de>
Corrected Host header handling (fixes #2477)
User-Agent header no longer needs a leading space
Fix bug with unsigned 'char' type (arm) in option parsing (fixes github#6)
Improve option error handling
calculate concur & reqs more easily

When i is increased to (config.thread_count - 1), rest_concur has been decreased to zero.
Therefore diff is always 1 in loop. It is unnecessary to calculate diff.
Add JSON output.
Link with tcmalloc if available
Add Linux TCP_FASTOPEN support (-f flag)

Linux Kernels 3.6 and 3.7, introduces client and server support
for a new TCP featured called TCP_FASTOPEN. This feature reduces
the TCP handshake roundtrip improving performance for new
connections.

This patch implements this optional feature in weighttp through
the argument '-f'. If for some reason the system do not allow
a connection in this new mode, it will fail with the following
error message:

--
Error: the server do not support TCP_FASTOPEN or the feature
is disabled in the Kernel:

  - Verify that your server is running at least Linux Kernel 3.7
  - Verify that this machine is running at least Linux Kernel 3.6
  - Check on both machines that TCP_FASTOPEN is enabled:

       # cat /proc/sys/net/ipv4/tcp_fastopen

    if the value is zero then enable it with:

       # echo 1 > /proc/sys/net/ipv4/tcp_fastopen

--

Signed-off-by: Eduardo Silva <edsiper@gmail.com>