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.

Built from https://develop.svn.wordpress.org/trunk@25147


git-svn-id: http://core.svn.wordpress.org/trunk@25126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The main site of a secondary network should not use the original wp-content/uploads upload path.

props jeremyfelt.
fixes #25030.

Built from https://develop.svn.wordpress.org/trunk@25148


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