Activity: Support multiple scopes in `bp_has_activities()`.

This commit:
* Allows the `'scope'` parameter to support multiple scopes.  For example, `scope=friends,mentions`.  This can be a comma-delimited string or an array.
* Makes the `'scope'` parameter available across the `bp_has_activities()` stack.  Previously, `'scope'` was only available for use in the `bp_has_activities()` loop.
* Parses scopes using the `BP_Activity_Query` class to handle complex conditions.
* Allows components to declare their own custom activity scopes.  Components can also override existing activity arguments by setting the `'override'` key in their scope callback.  For an example, see how the friends component declares the `'friends'` scope in `bp_friends_filter_activity_scope()`.  Previously, it was not possible for components or third-party plugins to declare their own scopes without doing a fair bit of workarounds.

See #4988.

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