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
Can you please use ```self```instead of ```static```?