allow unsharing to be detected by getSharedDatabases watcher, and garbage collect old info
use more traditional doc.type field for cleaner code