fix wait_for_connection

Wait for connection was considering a connection *trying* to connect as
a valid connection, which is wrong.
Update expired cacert.org certificates
Fix wait_for_connection to tolerate badrpc
Add better logging to repl_ssl, improve test somewhat