Better validation of the URL used in core HTTP requests.

Merges [24480] to the 3.5 branch.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@24481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Merge [23603] and [23608] to the 3.5 branch. This funnels all redirect requests through WP_HTTP::request() via wp_remote_request(). see #23682.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@24483 1a063a9b-81f0-0310-95a4-ce76da25c4cd