cleanup queries
destroy share doc reference when unloading a doc