Fix https host name verification

This pr extends the openssl binding by wrapping lots more functions and structures. Most of them aren't immediately useful, but it can't hurt to have them I think. Maybe on Windows, functions in the BIO_ namespace can be used to implement https.

The important change is the rewritten host name verification words which now considers the subject alternative names along with the common name. It should fix #475 and #904.