Add method to check if a user is in a certain group

This is an extension to the api that the groups module provides to other
modules. In some modules it can be convenient to check if a user is in a
certain group.

I already submitted this once, but was asked to resubmit for 3.7, see
https://github.com/forkcms/forkcms/pull/698
I prefer static too :)
But self is more consistent in Fork. Maybe we should decide to replace all instances to static?