fix issues when running highlighter in a different thread

when highlighting finishes in a different thread, the source code may
have changed in the mean time, making the tokenization invalid. This can
cause coloring to be applied that's off by a few characters, or even
exceptions if the file has been shortened.

This fix discards the tokenizer result if the file has changed by seeing
if there is another queued highlighter job. This has a side effect of
causing newly typed text to syntax highlight slower (if you type really
fast, or highlighting is slow).

Also use the implicit lock in the SingleJobQueue object for
synchronization instead of creating another object.
Merge pull request #83 from yiding/master

small fix for syntax highlighter in async mode