Define WP_ADMIN before loading WordPress

... where "loading WordPress" also includes loading plugins and themes.

Also, define WP_NETWORK_ADMIN and WP_USER_ADMIN, for completeness.

see #385
Merge remote branch 'upstream/master'

Conflicts:
	php/wp-cli.php