Function onCatalogChange

Subscribe to catalog changes (e.g. a grant added/revoked). Invoked immediately with the current catalog, then on every change. Returns an unsubscribe fn.