zz40-xc-ovr.m4: internals overhauling

- Update comments
- Execute commands in subshells
- Faster path separator check
- Fix missing 'test' command
- Rename private macros
- Minimize AC_REQUIRE usage
imap.c: Fixed failure detection during TLS upgrade

imap_state_upgrade_tls() would attempt to incorrectly complete the
upgrade to imaps and start the CAPABILITY command if
Curl_ssl_connect_nonblocking() returned a failure code and if ssldone
was set to TRUE. This would only happen when a non-blocking API hadn't
been provided by the SSL implementation and curlssl_connect() was
called underneath.
pop3.c: Fixed failure detection during TLS upgrade

pop3_state_upgrade_tls() would attempt to incorrectly complete the
upgrade to pop3s and start the CAPA command if
Curl_ssl_connect_nonblocking() returned a failure code and if ssldone
was set to TRUE. This would only happen when a non-blocking API hadn't
been provided by the SSL implementation and curlssl_connect() was
called underneath.
smtp.c: Fixed failure detection during TLS upgrade

smtp_state_upgrade_tls() would attempt to incorrectly complete the
upgrade to smtps and start the EHLO command if
Curl_ssl_connect_nonblocking() returned a failure code and if ssldone
was set to TRUE. This would only happen when a non-blocking API hadn't
been provided by the SSL implementation and curlssl_connect() was
called underneath.
smtp.c: Corrected RFC references

The most recent version of the SMTP RFC is RFC5321 and not RFC2821 as
previously documented.

Added RFC1870 and re-ordered list numerically.
zz40-xc-ovr.m4: parentheses balancing of 'case' statements

m4 quadrigraph shell comment technique allows proper autoconf
parentheses balancing in shell 'case' statements. The presence
of unbalanced parentheses may otherwise trigger expansion bugs.
zz40-xc-ovr.m4: avoid double single-quote usage
zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
zz40-xc-ovr.m4: fix variable assignment of subshell output bashism

Tor Arntsen analyzed and reported the issue.

URL: http://curl.haxx.se/mail/lib-2013-01/0306.html
zz40-xc-ovr.m4: truly do version conditional overriding

- version conditional overriding
- catch unexpanded XC macros
- fix double words in comments
smtp.c: Added comments to smtp_endofresp()

Minor code tidy up to add comments similar to those used in the pop3
and imap end of resp functions, in order to assist anyone reading the
code and highlight the similarities between each of these protocols.
zz40-xc-ovr.m4: emit witness message in configure BODY

This avoids witness message in output when running configure --help,
while sending the message to config.log for other configure runs.
email: Updated comment regarding ssldone usage

Updated the ssldone comment as multi mode is always used internally now.
imap.c: Fixed unnecessary state change if starttls fails

The state machine should only be changed to IMAP_STARTTLS when the
STARTTLS command has been successfully sent to the server.
pop3.c: Fixed unnecessary state change if starttls fails

The state machine should only be changed to POP3_STARTTLS when the
STLS command has been successfully sent to the server.
smtp.c: Fixed unnecessary state change if starttls fails

The state machine should only be changed to SMTP_STARTTLS when the
STARTTLS command has been successfully sent to the server.
Fixed simple.c to work again unchanged.

Added CURLOPT_FOLLOWLOCATION since example.com is now redirected.
Updated dependency libs.
docs: update the comments about loading CA certs with NSS

Bug: https://bugzilla.redhat.com/696783
docs: fix typos in man pages

Reported by: Jiri Jaburek
Bug: https://bugzilla.redhat.com/896544