Prevent memory leaks in post_conf hook
Prevent memory leaks in post_conf hook

Valgrind indicated memory leaks from GnuTLS structure initializations
in mgs_load_files(). This method is called from the post_config hook,
so there was no continuous leak, but graceful restart might have been
affected. There were two main reasons for the leaks:

* GnuTLS does not use the APR memory pool infrastructure, so its
  structures are not automatically deinitialized when the pool
  lifetime ends. Registering a cleanup hook with the pool solves this
  problem.

* Memory for the X.509 certificate chain (sc->certs_x509_crt_chain) is
  allocated from the config pool at the beginning of mgs_load_files(),
  but the certificates were loaded using
  gnutls_x509_crt_list_import2(), which allocates memory on its own,
  the pointer to which was lost when the server config pool was
  destroyed. Switch to gnutls_x509_crt_list_import() to use the pool
  memory.

Additionally, all pointers to the structures released by the pool
cleanup hook must be properly initialized to NULL (and reset on
deinit) to make sure they are only deinitialized if they have been
actually been initialized. Not doing that results in interesting stack
traces, but not a working server.

Note that this commit fixes only the leaks visible in my Valgrind
analysis of a server with an X.509 identity and an anonymous
client. Other structures will be covered by follow-up commits after
additional review.

airtower-luna/mod_gnutls,airtower-luna/mod_gnutls,airtower-luna/mod_gnutls