Don't fetch item counts in profile navigation unnecessarily.

Previously, when a component's setup_nav() method is fired, the item
count for the component is fetched without any conditional checks.

This causes unneccessary queries to be fired when a user isn't logged
in or when we're not on a single user page.

This commit only fetches the item count in the profile nav if we're
currently on a single user page and/or if the current user has access
to the component nav item.

Fixes #5413

Props r-a-y, boonebgorges

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7966 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r7966

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7967 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't use extract() in BP_Messages_Notice::get_notices().

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7968 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add phpDoc for BP_Messages_Notice class.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7969 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Merge branch 'master' into xprofile-types