DispatcherHost owns API objects and deletion

The Window object should be deleted on browser side when
DispatcherHost is removed (e.g. dev reload), which will then
trigger decoupling with shell, or it cannot be closed.

Fix #1330