Compiler: Prevent duplicate compilation. (#760)

Fixes #760.

Added singleton property to `ITextDocument` in `CompilerNotifierProvider`.