do a better job cleaning up event listeners after disconnecting a doc from ace