Augment CodeMirror instance with detachShareJsDoc()

In a single app context, CodeMirror instances might be attached several times to the same shared doc. This can lead to multiple share channels attached to multiple ghost instances of CodeMirror for the same file, causing an infinite loop while the editors keep appending content to the file.

This new method allows for safely disconnecting a shareJs doc from a CodeMirror instance.