Use max() to choose longest match

Theoretically this is more efficient than using sorted().
Merge pull request #6 from tdryer/tdryer

Use max() to choose longest match
Fix #7 Lexer using OrderedDict for TokenDef is slow

Since we can't introspect a classes attributes in the order in which
they were defined, I need to use an OrderedDict a second time to keep
track of any new TokenDefs that were added by a subclass.

In Python 3.4 class attributes will retain their ordering by default.
Merge pull request #8 from mtomwing/fix-7-lexer-ordereddict

Fix #7 Lexer using OrderedDict for TokenDef is slow
Merge branch 'master' into new-parser

Conflicts:
	purplex/parse.py