Multisite: Add get_network_by_path() and wp_get_network() to begin cleanup of multisite load.

Tries to get network detection under control by simplifying wpmu_current_site(). It now also pops off each subdomain to find a more general match. Adds unit tests for get_network_by_path() and a new network factory for unit tests.

Much of this is likely to change in 3.9 as more of ms-load.php and ms-settings.php gets hacked to bits.

props jeremyfelt.
see #27003.


git-svn-id: https://develop.svn.wordpress.org/trunk@27178 602fd350-edb4-49c9-b593-d223f7449a82