Small rework of code for applying drag and drop reordering of rules and some extra checks added to fix some potential bugs. Ticket #878
Small rework of code for applying drag and drop reordering of rules and some extra checks added to fix some potential bugs. Ticket #878

Also minimizes the extent of the changes performed (useful when comparing config.xml files from before and after).

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