Remove a ton of duplicate and obsolete code from configure.

Note: I have avoided touching some of the GnuTLS/OpenSSL code in this as I will be purging that in favour of automatically enabling them when available and I would like to avoid merge conflicts.