Made this extension work for all file types, not just javascript files.

The javascript-specific algorithm is still used for javascript files, but I
added a generic algorithm that is used for all other filetypes.  In the
future other language-specific algorithms can be added, and the
generic algorithm can remain as a fallback only for unrecognized
filetypes.
Added timer to generic sniffer.
Fixed bug that was causing a hang on some files.
Added some guards against pathological cases in the generic algorithm.
Changed all identifiers to camelCase.
Use do-while for relevant loops.
Split the analysis phase into more sensible pieces.
Generic sniffer now aborts on too many overly-long lines.
Merge pull request #9 from cessen/master

Added support for all text-based documents