Convert group slug to lower case when checking whether slug exists

For slugs containing only latin characters, the clause WHERE foo = 'bar'
is non-case-sensitive. However, this is not the case for different UTF8 slugs.
The result is that using the incorrect case in a URL would result in 404s.

Fixes #5056

Props gametako, r-a-y

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7583 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use bp_loggedin_user_id() in bp_messages_get_notices()

The previous use of the $userdata global was causing problems for installations
that were doing funny things with userdata. In addition, the BP wrapper is more
standard for our codebase.

Fixes #5059

Props AliMH

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