Tests: update activity tests to use `bp_activity_get_permalink` to get a link to an activity item rather than manually constructing a link from an activity ID.

See #5926
Activity: when redirecting unauthenticated users away from a single activity permalink, make sure the value of the `redirect_to` parameter has been URL encoded.

See #5926
Activity: refactor part of `bp_get_activity_latest_update` to use `bp_activity_get_permalink` to get a link to an activity item rather than manually constructing the link.

See #5926
Merge branch 'master' into activity-permalinks
Refactor bp_activity_get_permalink to return real link, and add new function to return activity short links.
Update/add tests for new shortlink func
New template functions for short links
Switch some permalinks to short links for backpat
Merge branch 'master' into activity-permalinks
Merge branch 'activity-permalinks' into activity-oembed