Fix bugs in omniglot plugin and add example of hg repo

This fixes some bugs in the omniglot plugin as well as
providing a more useful view for the diff link.
ref bug #974535: https://bugzilla.mozilla.org/show_bug.cgi?id=974535
improve speed of finding last revisions
Make a few style tweaks.
Fix bug 974535. Fix some other crashers in omniglot.
Merge fix of missing import.