Fix group matching SQL query

The check there is intended for the :members_mods_and_admins level, which is not automatically checked for normal users. Instead, the :everyone level is the one used, which would always fulfill the "alias_level in :levels" check.

This changes the :everyone level to :members_mods_and_admins, which was originally intended.
Change to case-insensitive matching in group @name matching
Merge pull request #1824 from riking/patch-2

Fix group matching SQL query