Integrate CodeMirror v4 and implement multiple selections

Landing the CodeMirror v4 work into master.