IPA_RULES_COMMON: Introduce ipa_common_get_hostgroupname()
By moving the get_ipa_hostgroupname() method from ipa_hbac_hosts.[ch] to
ipa_rules_common.[ch] it can be used by both HBAC and, in the future,
for new backend modules.
The method got renamed to ipa_common_get_hostgroupname() and some coding
style changes have been made in order to match with what SSSD follows.
Signed-off-by: Fabiano Fidêncio <firstname.lastname@example.org>
Reviewed-by: Pavel Březina <email@example.com>
Reviewed-by: Jakub Hrozek <firstname.lastname@example.org>