TLSClient: add verify_certificate as member function

Certificate verification is now done in a member function of the
TLSClient, so that the member variables could be accessed.
TLSClient: add hostname verifcation

The CN or subjectAltNames of the TLS certification is now matched with
the hostname connected to.

taskd.trust is now a tristate value (allow all, ignore hostname,
strict) to optionally disable the new hostname verification.