Accept unordered certificate chains

Some TLS servers improperly send an unordered chain of certificates,
where the next certificate in the chain is not the issuer of the current
certificate. Recent versions of GnuTLS will verify the chain anyway to
help reduce unnecessary validation failures (since there is no security
risk in doing so).

When the certificates are unordered, get_peer_certificate_from_session()
will construct GTlsCertificates with incorrect issuer fields, causing
trouble with unordered chains even though GnuTLS would otherwise handle
these fine.

https://bugzilla.gnome.org/show_bug.cgi?id=683266
gnutls: Closing an already-closed connection should return TRUE

See the implementation of g_io_stream_close()

https://bugzilla.gnome.org/show_bug.cgi?id=735754
2.41.92
2.42.0
gnutls: Reorder ‘static’ and ‘const’ attributes

gcc prefers them this way round — the other way round is old-style.

https://bugzilla.gnome.org/show_bug.cgi?id=736809
gnutls: Fix a signed/unsigned integer comparison

https://bugzilla.gnome.org/show_bug.cgi?id=736809
gnutls: Add a missing enum value to a switch statement

And a missing default case. This introduces no functional changes.

https://bugzilla.gnome.org/show_bug.cgi?id=736809
tls: Add source tags to GTasks

To help with debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=736757
proxy: Add source tags to GTasks

To help with debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=736757