Core: adjust `bp_modify_page_title()` so that it can be used safely after the `wp_head` action.

The function is used to set the value for the page's `<title>` element, but it currently throws a PHP Notice if it's used after the `wp_head` action is triggered.
This is because `bp_core_sort_subnav_items()` (hooked to `wp_head`) re-keys the global `$bp->bp_options_nav` array; the keys are changed from strings to integers representing the desired order of the menu items.

Fixes #6077

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