Make SSL certificate verification configurable

I've implemented a simple way to make SSL verification configurable.
You can now enable it (which was the default before the change and still is the default now), disable it entirely or provide a custom server certificate which will be used to verify the connection.
Details are given in docs/ssl-certificate-verification.md