avoid unregistering widget model twice

widgets are registered when the comm is created;
closing unregisters them. Calling `close` a second time
should be a no-op.
Merge pull request #6250 from minrk/double-free-widget

avoid unregistering widget model twice