Fix escape handling in qWinCmdArgs

-DKEY="VALUE" was correctly turned into -DKEY=VALUE,
but -DKEY=\"VALUE\" was turned into -DKEY=\VALUE"
due to the erroneous check ('quote' is still 0 when
encountering the first '\' character).

This fixes QCoreApplication::arguments() as used by
moc.exe after porting to QCommandLineParser.

Further investigation shows that double-quotes and single-quotes
are handled differently. The tests now ensure that this parser
respects what Windows sends in argv, and in particular that
QTBUG-15379 doesn't regress, as well as fixing QTBUG-30628.

Task-number: QTBUG-15379, QTBUG-30628

Change-Id: I95062c9a6022632b321b2f6fae3089f07be7b5c6
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Port moc to QCommandLineParser

This required special care because of @option-file where additional args can be read from.

Found again one undocumented option, --ignore-option-clashes.

Usage: moc [options] [header-file] [@option-file]
Qt Meta Object Compiler version 67 (Qt 5.2.0)

Options:
  -h, --help               Displays this help.
  -v, --version            Displays version information.
  -o <file>                Write output to file rather than stdout.
  -I <dir>                 Add dir to the include path for header files.
  -F <framework>           Add Mac framework to the include path for header fil
                           es.
  -E                       Preprocess only; do not generate meta object code.
  -D <macro[=def]>         Define macro, with optional definition.
  -U <macro>               Undefine macro.
  -i                       Do not generate an #include statement.
  -p <path>                Path prefix for included file.
  -f <file>                Force #include [optional <file>] (overwrite default)
                           .
  -b <file>                Prepend #include <file> (preserve default include).
  -n <which>               Do not display notes (-nn) or warnings (-nw). Compat
                           ibility option.
  --no-notes               Do not display notes.
  --no-warnings            Do not display warnings (implies --no-notes).
  --ignore-option-clashes  Ignore all options that conflict with compilers, lik
                           e -pthread conflicting with moc's -p option.

Arguments:
  [header-file]            Header file to read from, otherwise stdin.
  [@option-file]           Read additional options from option-file.

Change-Id: I0dfa8e029f95ad8084832530d701e30f315df98e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCommandLineOption: improve runtime warnings

Change-Id: I48a278acf3a8eb0cfa829deb65cf65dfd8ec23af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCommandLineParser: improve documentation

Based on feedback from Thiago

Change-Id: I8912447197e636732e5b8ac37e77d18b54e9b43d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCommandLineParser: improve implementation

Based on feedback from Thiago.

Change-Id: I9a3ce0b90b5d1d680c66351d421874effbd426f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>