Add filter to 'user_has_access' nav item.

This will allow plugins to customize access to the settings page.
Default 'user_has_access' to check for is_super_admin() as well.

This will allow super admins to change the usernames for other users.
Change current user variables to displayed user.

This makes sure that a super admin can change a user's user_login.
Fix 'profile_update' hook.

$current_user parameter is supposed to pass the old user data and not the
new one.
Delete userlogins object cache before using username_exists() function

When using an object cache, we must clear the 'userlogins' object cache
for both the old userlogin and new one to prevent checking older user
login values.
Trim whitespace.
Only change auth cookies if the current user is changing their username.

If a super admin changes a user's username, we don't want to log them
in as that user after submitting the form.
Update inline comments about wp_update_user()

Makes things clearer for the dev.
Use auth cookie logic from wp_update_user().

Better to stick with core.
Clean entire user cache instead of just deleting the 'users' cache.

clean_user_cache() also clears the 'userslugs' object cache.
Remove unnecessary $changed variable.
Remove 'profile_update' action.

This hook already runs during wp_update_user() (via wp_insert_user()).
Instead, rename hook to 'bp_username_changed'.
Use bp_core_get_user_domain() instead of bp_displayed_user_domain().

sbrajesh was right to use bp_core_get_user_domain() because of cached
values.
Merge pull request #1 from hwdsbcommons/displayed_user

Allow super admins to edit other usernames