Call daemonize before chroot.

This patch causes stud to daemonize prior to calling chroot. If chroot
is done prior to daemonize, the daemonize call will fail to open
/dev/null.

NOTE: Manual patch of https://github.com/bumptech/stud/commit/81bbb3f0f078d20c4ea24a40effde6cbb3a5f138
print error message(s) if parsing RSA private key fails

NOTE: Manual patch of https://github.com/dan-cx/stud/commit/7c4b90c35df012b5236324618ea3e1b711abecfd
Fix TLS setting to use TLS 1.x (support TLS 1.1/1.2)

When we run using "--tls" (default) we create the SSL context with a
TLSv1_*_method(), however, this _only_ supports TLS 1.0 connections. In
contrast, when we run with "--ssl" we use a SSLv23_*_method() which
allows all supported protocols. We block SSL 2.0 by passing in the
SSL_OP_NO_SSLv2 flag in SSL_CTX_set_options. This results in the
somewhat counterintuitive situation where the supported protocols are:

    --tls: TLS 1.0
    --ssl: SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2

This patch fixes the handling of "--tls" so that it supports TLS 1.x
while ensuring SSL 3.0 is blocked (SSL 2.0 is always blocked).

This all assumes an OpenSSL library capable of supports newer TLS
versions, otherwise, the above change will have no effect on stud's
behaviour (ie. --ssl supports SSL 3.0/TLS 1.0, --tls supports TLS 1.0).

NOTE: Manual patch of https://github.com/ralish/stud/commit/4ff82d1d2f4771aff45a0e4fd48726595437bb06