lexan: remove offset parameter from find_longest_match and use slices

Signed-off-by: Peter Williams <pwil3058@gmail.com>
sorting: use D built in sort capabilities instead of sets for sorting

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
sets: use structs for sets instead of classes

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
sets: bring over improved set implementation from ordt project

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
grammar: don't duplicate GrammarItemSets with dup

Don't duplicate GrammarItemSets as it will cause problems with shared
_elements arrays in Set instances.  Should not cause any problems as
closure() is only ever called with rValues.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>