Add engine/completion.c:compl_set_add_hook()

Sets match addition hook.  NULL value resets hook.
Add unit-tests for completion add hook
Determine argument type in commands.c:line_pos()
Extract commands.c:get_cmdline_location()

Analyzes position on the command-line.
Move replace_esc() to utils/utils.c

And rename it to expand_dquotes_escaping().
Expands escape sequences from double quoted string (e.g. "\n") in
place.
Prepare complete_args() for handling quoted args
Switch to using completion add hook
Add string escaping functions

 - escape_for_squotes
   Escapes string for insertion into single quoted string.

 - escape_for_dquotes
   Escapes string for insertion into double quoted string.
Add missing escaping on Ctrl-X in cmdline mode

Depends in which type of argument escaping occurs: single quotes,
double quotes or without quotes.
Smart escape arguments on completion
Skip first quotes on escaping
Fix completion of single quote

Used to require at least one more character to complete correctly.
Add unit tests for smart completion
Move expand_squotes_escaping() to utils/utils.c

Used to be called replace_double_squotes() in engine/cmds.c
Add user argument to completion functions
Use switch stmt in engine/cmds.c:dispatch_line()
Handle escaping on completion properly
Document smart completion
Merge branch 'smarter-cmdline-completion'

Smart paths completion that allows completion of quoted arguments (both '
and " types of quotes) and considers argument type context by performing
escaping when needed.
Add engine/completion.c:add_last_match()

Adds original input to the completion, should be called after all
matches are registered with add_completion().