Use event delegation for directory buttons in bp-legacy

This ports r6919 to bp-legacy

See #4931, #4969

git-svn-id: https://buddypress.svn.wordpress.org/trunk@6972 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use event delegation to disable .pending buttons in bp-legacy

See #4969

Props megainfo

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