On members directory, make sure search terms containing spaces are well transported in pagination links.

When a profile field output containing spaces was clicked, the member search functionality wasn't creating consistent pagination links. This behavior was introduced by r8928. Patch is fixing the issue and also includes a unit test.

props boonebgorges

Fixes #5898

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