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
Just use `static`. A separate issue was created for the use of `static` instead of `self`, see: https://github.com/forkcms/forkcms/issues/786