Add try/finally to endOperation

Currently, if there is an error thrown somewhere in the endOperation function it will fail to decrement delayedCallbackDepth, which makes events fired with signalLater never get fired. This is especially bad since the delayedCallbacks list is used by all CodeMirror instances, so in our application once we had an error happen here in one CodeMirror instance, *all* the CodeMirror instances we were using stopped sending 'change' events.

The place where the try ends and the finally begins was chosen somewhat randomly here; I'd even be fine with just having the --delayedCallbackDepth part in the finally, but I didn't know if it was safe to move around.