Canonical URL detection should be sensitive to page_on_front

When a BP directory is set to page_on_front, it should no longer be accessible
at the regular directory URL (to avoid duplicate URLs for the same content).

A special exception is required for the Register page. Because BP blocks access
to Register for logged-in users, the canonical redirect for Register when
viewed by a logged-in user must be something other than the front page. As in
bp_core_screen_signup(), we use the Members directory in this case (a page we
can be reasonably sure will always be present).

Fixes #5199

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