Core: make the filter in `bp_core_register_common_scripts()` more useful.

Prior to this change, the data passed to the filter was pretty limited, making the filter
not very useful. This change makes the filter provide a full path for the scripts being
registered and allows scripts' dependencies to be set.

Minor codestyle improvements have also been included.

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