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).

Let's make both of these classes final and have them implement an interface to reduce mutability.