Check host/email/ip

Hostname/email verification code ported from OpenSSL 1.0.2 beta2.
Also includes verify callback enabling more detailed validation errors reporting. 

PS I want to write tests for matching code but it looks like I have to choose testing library by myself. I'm considering fiveam or maybe lift. What you think?