Use wp_safe_remote_request() and friends instead of reject_unsafe_urls = true.

Merges [24917] to the 3.6 branch.
fixes #24646.



git-svn-id: https://core.svn.wordpress.org/branches/3.6@24918 1a063a9b-81f0-0310-95a4-ce76da25c4cd