properly remove all doc listeners

see https://github.com/josephg/ShareJS/commit/bae74fe67c5def81f4b02018ebdc497a7686c604