Improvements to i18n number formatting in activity count functions/templates

This changeset makes number formatting more consistent in the activity
templates of bp-legacy. The logic is as follows:

- Move all number formatting out of the templates and into the relevant
  -template.php file.
- Add number formatting to those _count() template functions that were missing
  it.
- Clean up sprintf() swapping arguments to account for string vs int number
  formats

See #4997, #5228

Fixes #5231

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