Verify hostname according to rfc2818

Without this check HTTPS connection is vulnerable to MITM attack when the attacker would return a valid certificate but from wrong host.
You also need to change the declaration of `connection_delegate::connect(...)` to match this -- it's pure virtual there, and it causes the error.