imap-send: use parse options API to determine verbosity

The -v/-q options were sort-of supported but without using the
parse-options API, and were not documented.

Signed-off-by: Bernhard Reiter <ockham@raz.or.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-imap-send: use libcurl for implementation

Use libcurl's high-level API functions to implement git-imap-send
instead of the previous low-level OpenSSL-based functions.

Since version 7.30.0, libcurl's API has been able to communicate with
IMAP servers. Using those high-level functions instead of the current
ones would reduce imap-send.c by some 1200 lines of code. For now,
the old ones are wrapped in #ifdefs, and the new functions are enabled
by make if curl's version is >= 7.34.0, from which version on curl's
CURLOPT_LOGIN_OPTIONS (enabling IMAP authentication) parameter has been
available. The low-level functions will still be used for tunneling
into the server for now.

As I don't have access to that many IMAP servers, I haven't been able to
test the new code with a wide variety of parameter combinations. I did
test both secure and insecure (imaps:// and imap://) connections and
values of "PLAIN" and "LOGIN" for the authMethod.

In order to suppress a sparse warning about "using sizeof on a
function", we use the same solution used in commit 9371322a6
("sparse: suppress some "using sizeof on a function" warnings",
06-10-2013) which solved exactly this problem for the other commands
using libcurl.

Helped-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Bernhard Reiter <ockham@raz.or.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/fetch-reflog-df-conflict'

Fix-up a test for portability.

* jk/fetch-reflog-df-conflict:
  t1410: fix breakage on case-insensitive filesystems
Merge branch 'nd/gitignore-trailing-whitespace' into maint

* nd/gitignore-trailing-whitespace:
  gitignore.txt: fix spelling of "backslash"
Sync with 'maint'
Update draft release notes to 2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'br/imap-send-verbosity' into next

* br/imap-send-verbosity:
  imap-send: use parse options API to determine verbosity
Merge branch 'br/imap-send-via-libcurl' into next

* br/imap-send-via-libcurl:
  git-imap-send: use libcurl for implementation
Sync with master

* master:
  Update draft release notes to 2.2