Fix #284 (NPE while adding a site on SSL with errors in the SSL certificate)

Actually the error was happening when the user was trying to add a site that uses HTTPS, and the classic way of appending '/xmlrpc.php" at the end of the URL did not worked fine.
The error was inside the XML-RPC endpoint discovery procedure. That code were reached by a minority of of users.