http2: Deal with HTTP/2 data inside response header buffer

Previously if HTTP/2 traffic is appended to HTTP Upgrade response header
(thus they are in the same buffer), the trailing HTTP/2 traffic is not
processed and lost.  The appended data is most likely SETTINGS frame.
If it is lost, nghttp2 library complains server does not obey the HTTP/2
protocol and issues GOAWAY frame and curl eventually drops connection.
This commit fixes this problem and now trailing data is processed.
http2: fix switched macro when http2 is not enabled
RELEASE-NOTES: synced with 2ee3c63b13
test22: expand a backtick command

This is the only user of the backtick operator in the command. As the
commands will soon not be executed by a shell anymore (but by perl),
replace the command with its output.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
CMake: Restore order-dependent header checks

Revert commit 1269df2e3b (Cmake: Don't check for all headers each
time, 2014-08-15) and add a comment explaining the purpose of the
original code.

The check_include_file_concat macro is intended to be called multiple
times on a sequence of possibly dependent headers.  Later headers
may depend on earlier headers to provide declarations.  They cannot
be safely included independently on some platforms.

For example, many POSIX APIs document including sys/types.h before some
other headers.  Also on some OS X versions sys/socket.h must be included
before net/if.h or the check for the latter will fail.

Signed-off-by: Brad King <brad.king@kitware.com>
CMake: Restore order-dependent library checks

Revert commit 2257deb502 (Cmake: Avoid cycle directory dependencies,
2014-08-22) and add a comment explaining the purpose of the original
code.

The check_library_exists_concat macro is intended to be called multiple
times on a sequence of possibly dependent libraries.  Later libraries
may depend on earlier libraries when they are static.  They cannot be
safely linked in reverse order on some platforms.

Signed-off-by: Brad King <brad.king@kitware.com>
ntlm: We prefer 'CURLcode result'
ntlm: Clean-up and standardisation of base64 decoding
sasl_sspi: Added missing RFC reference for HTTP Digest authentication
sasl: Moved Curl_sasl_gssapi_cleanup() definition into header file

Rather than define the function as extern in the source files that use
it, moved the function declaration into the SASL header file just like
the Digest and NTLM clean-up functions.

Additionally, added a function description comment block.
sasl_sspi: Corrected a couple of comment typos
TODO: Lets support QOP options in GSSAPI authentication
docs: Use consistent naming for Kerberos
urldata: Don't define sec_complete when no GSS-API support present

This variable is only used with HAVE_GSSAPI is defined by the FTP code
so let's place the definition with the other GSS-API based variables.
tool: Use Kerberos for supported features
tool: Removed krb4 from the supported features

Although libcurl would never return CURL_VERSION_KERBEROS4 after 7.33,
so would not be output with --version, removed krb4 from the supported
features output.
sasl: Corrected Curl_sasl_build_spn() function description

There was a mismatch in function parameter names.
http2: Don't send Upgrade headers when we already do HTTP/2
examples: Don't call select() to sleep on windows

Windows does not support using select() for sleeping without a dummy
socket. Instead use Windows' Sleep() and sleep for 100ms which is the
minimum suggested value in the curl_multi_fdset() doc.

Prior to this change the multi examples would exit prematurely since
select() would error instead of sleeping when called without an fd.

Reported-by: Johan Lantz
Bug: http://curl.haxx.se/mail/lib-2014-11/0221.html
kerberos: Use symbol qualified with _KERBEROS5

For consistency renamed USE_KRB5 to USE_KERBEROS5.