BUG/MEDIUM: checks: agent doesn't get the response if server does not closes

The agent refrains from reading the server's response until the server
closes, but if the server waits for the client to close, the response
is never read. Let's try to fetch a whole line before deciding to wait
more.
BUG/MEDIUM: map: Bad map file parser

There is a mix-up between input type of the data and input type of the
map file. This mix-up causes that all pattern matching function based
on "string"  (reg, beg, end, ...) don't run.

This bug came with commit d5f624d (MEDIUM: sample: add the "map" converter),
no backport is needed.
CLEANUP/MINOR: standard: use the system define INET6_ADDRSTRLEN in place of MAX_IP6_LEN
BUG/MEDIUM: sample: conversion from str to ipv6 may read data past end

Applying inet_pton() to input contents is not reliable because the
function requires a zero-terminated string. While inet_pton() will
stop when contents do not match an IPv6 address anymore, it could
theorically read past the end of a buffer if the data to be converted
was at the end of a buffer (this cannot happen right now thanks to
the reserve at the end of the buffer). At least the conversion does
not work.

Fix this by using buf2ip6() instead, which copies the string into a
padded aread.

This bug came with recent commit b805f71 (MEDIUM: sample: let the
cast functions set their output type), no backport is needed.
MINOR: map: export map_get_reference() function

This function is used to identify map with his reference into the CLI
functions.
MINOR: pattern: Each pattern sets the expected input type

This is used later for increasing the compability with incoming
sample types. When multiple compatible types are supported, one
is arbitrarily used (eg: UINT).
MEDIUM: acl: Last patch change the output type

This patch remove the compatibility check from the input type and the
match method. Now, it checks if a casts from the input type to output
type exists and the pattern_exec_match() function apply casts before
each pattern matching.
MINOR: tools: buf2ip6 must not modify output on failure

Use a temporary output buffer to ensure we don't affect the output
on failure of inet_pton().
MINOR: pattern: do not assign SMP_TYPES by default to patterns

This is never used since we exit on parse failure, and it's confusing.
MEDIUM: pattern: Extract the index process from the pat_parse_*() functions

Now, the pat_parse_*() functions parses the incoming data. The input
"pattern" struct can be preallocated. If the parser needs to add some
buffers, it allocates memory.

The function pattern_register() runs the call to the parser, process
the key indexation and associate the "sample_storage" used by maps.
MINOR: standard: The function parse_binary() can use preallocated buffer

Let the function support pre-allocated buffers if the argument is not null,
or allocate its own buffer if it is null.
MINOR: regex: Change the struct containing regex

This change permits to remove the typedef. The original regex structs
are set in haproxy's struct.
MINOR: regex: Copy the original regex expression into string.

This is useful for the debug or for search regex in maps.
MINOR: pattern: add support for compiling patterns for lookups

With this patch, patterns can be compiled for two modes :
  - match
  - lookup

The match mode is used for example in ACLs or maps. The lookup mode
is used to lookup a key for pattern maintenance. For example, looking
up a network is different from looking up one address belonging to
this network.

A special case is made for regex. In lookup mode they return the input
regex string and do not compile the regex.
MINOR: pattern: make the pattern matching function return a pointer to the matched element

This feature will be used by the CLI to look up keys.
MINOR: map: export parse output sample functions

This export is used to identify the parser used
MINOR: pattern: add function to lookup a specific entry in pattern list

This is used to dynamically delete or update map entry.
MINOR: pattern/map: Each pattern must free the associated sample
MEDIUM: dumpstat: make the CLI parser understand the backslash as an escape char

We'll need to pass patterns on the CLI for lookups. Till now there was no
need for a backslash, so it's still time to support them just like in the
config file.
MEDIUM: map: dynamic manipulation of maps

This patch adds map manipulation commands to the socket interface.

add map <map> <key> <value>
  Add the value <value> in the map <map>, at the entry corresponding to
  the key <key>. This command does not verify if the entry already
  exists.

clear map <map>
  Remove entries from the map <map>

del map <map> <key>
  Delete all the map entries corresponding to the <key> value in the map
  <map>.

set map <map> <key> <value>
  Modify the value corresponding to each key <key> in a map <map>. The
  new value is <value>.

show map [<map>]
  Dump info about map converters. Without argument, the list of all
  available maps are returned. If a <map> is specified, is content is
  dumped.