gnutls: don't use deprecated gnutls_connection_end_t
gnutls: fix "cast to pointer from integer of different size" warnings