register method
Register root. Returns a token to pass to deregister. Subscribes to
the root's revisions and schedules an immediate publish.
Implementation
int register(KaiselInspectable root) {
final token = _nextToken++;
_roots[token] = root;
root.debugRevision.addListener(_schedulePublish);
_ensureExtensions();
_schedulePublish();
return token;
}