Decouple cert/key specification and specifying the client/server mode of an SSLContext.

Also print a human readable error message in case of SSL errors instead of just the error code.