Fixes #536. More fixes and optimizations on the various functions used for gateways [groups].
Fixes #536. More fixes and optimizations on the various functions used for gateways [groups].

NOYB/pfsense,phil-davis/pfsense,NewEraCracker/pfsense,phil-davis/pfsense,ch1c4um/pfsense,BlackstarGroup/pfsense,BlackstarGroup/pfsense,ch1c4um/pfsense,NOYB/pfsense,jxmx/pfsense,dennypage/pfsense,brunostein/pfsense,pfsense/pfsense,pfsense/pfsense,ch1c4um/pfsense,NewEraCracker/pfsense,NOYB/pfsense,BlackstarGroup/pfsense,brunostein/pfsense,jxmx/pfsense,pfsense/pfsense,ptorsten/pfsense,phil-davis/pfsense,NewEraCracker/pfsense,NewEraCracker/pfsense,ptorsten/pfsense,dennypage/pfsense,brunostein/pfsense,BlackstarGroup/pfsense,dennypage/pfsense,jxmx/pfsense,pfsense/pfsense,ch1c4um/pfsense,phil-davis/pfsense,ptorsten/pfsense,dennypage/pfsense