Moved common cGroupManager code to a separate function.

This fixes my concerns in PR #709.
Documented the changes in cJukeboxEntity.