Refactored https authentication, added XHTTPSURLProtocol to handle https request for AJAX

[git-p4: depot-paths = "//xFace-Apollo/branches/test_opensource/": change = 16164]