Improvements to BP_UnitTestCase::go_to() for multisite

When using go_to() to ape a pageload on a secondary site in multisite, a
number of global variables (such as $current_blog and $current_site, which
are normall set in ms-settings.php) must be reset for that secondary blog.
Having the globals set correctly is important for certain kinds of MS-specific
unit tests, such as test_avatars_on_non_root_blog().

As a convenience, this changeset introduces BP_UnitTestCase::go_to_root(),
which allows for the easy resetting of the relevant globals at the end of a
testcase where go_to() has been used on a secondary blog.

See #4948

Props r-a-y

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7058 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fixes test_bp_core_ajax_url() for new multisite unit test global manipulation

The changes introduced in r7058, which adds improvemens to go_to() for use on
multisite installations, uncovered a limitation in the test_bp_core_ajax_url()
test. Basically, it shows that bp_core_ajax_url() will always point to
admin-ajax.php of the current site, *not* the root blog. This should not be a
problem in most cases, though we should keep an eye out in the future to see
whether problems arise on mapped domains, where cross-domain AJAX calls may be
affected.

See #4761

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7059 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Adds unit test for avatar directory detection on non-root blogs.

See #4948

Props r-a-y

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7060 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Adds missing declaration from previous commit

See #4948

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7061 cdf35c40-ae34-48e0-9cc9-0c9da1808c22