Common Code Removal

Like it says.

Also adds Longest Common Substring algorithm. It's slower than Smith-Waterman and about as accurate as line comparison. In short it's a massive failure and I don't think it can be optimized much more.

I'm going to do more optimization work on Smith-Waterman, and tokens in general, to try and improve performance to make it more usable. SOON(TM).

This change violates the contract of equals! Equals must be commutative;

Submission foo;
ValidityEnforcingSubmission bar;

bar.equals(foo) might be false when foo.equals(bar) is true.