Introduce is_main_network().

By default, a network ID of 1 is assumed to be the main network.
Otherwise, it is the first network listed in the wp_site table.

If PRIMARY_NETWORK_ID is defined, it is considered main network.

props jeremyfelt.
see #25030.


git-svn-id: https://develop.svn.wordpress.org/trunk@25147 602fd350-edb4-49c9-b593-d223f7449a82
The main site of a secondary network should not use the original wp-content/uploads upload path.

props jeremyfelt.
fixes #25030.


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