Ports "Are you sure you want to leave page" dialog to bp-default.

Originally implemented in bp-legacy in r7151.

Fixes #5091

Props imath

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