fix the livestatus output sorting for services

fix the livestatus output sorting for services by hostgroup and servicegroup.