Add support for SNI to the XML-RPC client

Fix #1288