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.
MINOR: sample: make sample_parse_expr() use memprintf() to report parse errors

Doing so ensures that we're consistent between all the functions in the whole
chain. This is important so that we can extract the argument parsing from this
function.
MINOR: arg: improve wording on error reporting

We make the distinction between missing too many arguments and no
arguments supported.
BUG/MEDIUM: sample: simplify and fix the argument parsing

Some errors may be reported about missing mandatory arguments when some
sample fetch arguments are marked as mandatory and implicit (eg: proxy
names such as in table_cnt or be_conn).

In practice the argument parser already handles all the situations very
well, it's just that the sample fetch parser want to go beyond its role
and starts some controls that it should not do. Simply removing these
useless controls lets make_arg_list() create the correct argument types
when such types are encountered.

This regression was introduced by the recent use of sample_parse_expr()
in ACLs which makes use of its own argument parser, while previously
the arguments were parsed in the ACL function itself. No backport is
needed.
MEDIUM: acl: fix the argument parser to let the lower layer report detailed errors

Just like for the last commit, we need to fix the ACL argument parser so
that it lets the lower layer do the job of referencing unresolved arguments
and correctly report the type of missing arguments.