added HashyLexicon and changed ResourceLexicons to use HashyLexicons

Also added unit tests to test/TestLexicon. I hope this doesn't break anything.