JS: Replace String.trim() method with jQuery's trim() function.

When using IE8 and when attempting to post an activity update, IE8
will throw an error and not post the update because of the usage of
String.trim(), which does not exist in IE8.

To fix this bug, we replace String.trim() with jQuery's version of
trim().

Props tomdxw for reporting the bug.

Fixes #5205.

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