Fix JS syntaxt error introduced in r7412

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7431 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Do a better job preventing theme compat from running when current_theme_supports( 'buddypress' )

This changeset ensures that when a theme declares add_theme_support( 'buddypress' ),
BuddyPress will not load any of its theme compatibility layer. Previously,
'buddypress' support would prevent templates from loading, but would still
allow the buddypress-functions.php file to load in certain cases.

To this end, two new functions are introduced:
- bp_detect_theme_compat_with_current_theme(), which centralizes the logic
  used by BuddyPress to detect whether the current theme will require theme
  compatibility (themes do not need theme compat when current_theme_supports( 'buddypress' ),
  when it's related to bp-default, or when members/members-loop.php is found).
  The function sets a global flag which can be checked later.
- bp_use_theme_compat_with_current_theme(), which is used to check the flag
  set in bp_detect_theme_compat_with_current_theme().

Fixes #4879

Props r-a-y

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