Improve accuracy and speed of license guessing

By pre-transforming text instead of doing it from within the scan()
function, we can avoid re-translating the text for every test.

Also, translating all newlines and multiple spaces into a single space,
the format that the license is in becomes less important.