[Server][FaceRest] Judge hostgroupId.

When number of hostgroups is only 1 and hostgroupId is ALL_HOST_GROUPS,
substitute value of numberOfHostgroups variable for
numberOfAllowedHostgroups variable.