Reinstates bp_redirect_canonical functionality

This was mistakenly removed when introducing theme compatibility.

Fixes #5171

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