Make use of SSL_IS_DTLS, SSL_USE_EXPLICIT_IV, SSL_USE_SIGALGS and
SSL_USE_TLS1_2_CIPHERS.

Largely based on OpenSSL head.
remove some #if 0 code. we don't need any more reminders that we're using
a not quite appropriate data structure. ok jsing
More KNF.