Extract group functions into a utility module.

This patch extracts group checking functions into a dedicated module so
that resource implementations are simplified.  The module could later be
used by the autoscaling engine as well.

Change-Id: I99cdd8c9e8fe377e6923ab047a9c2ef08d1defad
partial-blueprint: reorg-asg-code
partial-blueprint: as-lib
Merge "Extract group functions into a utility module."