Only parse a document if it's the active document

This reduces startup time and reduces memory consumption when
opening a project that was last closed with a lot of files open.
Move global Cobra.Compiler extensions into separate file
Use extension method to retrieve parsedDocument instance
Remove unused/commented code
Use File.readAllText instead of a StreamReader