Add customizable ordering to rules.

Uses jQuery-UI for drag-and-drop ordering.

Note that new rules will be dropped in at the beginning by default.