test: add https tls session reuse test

Check that TLS session resumptions work with HTTPS servers.

Regression test for #3901.