Make SSL verification optional

Disable SSL verification by default, add a config option to control the
behavior.
Improve debug logging, print all suppressed errors into log file.