Fix destruction observer.

We use MessageLoop::DestructionObserver interface to observe
for browser message loop destruction. This was always called in
InitializeHardware, which is only called from gpuprocess/gputhread.
This patch changes it so that the registration happens only for
browser process. In GPU process/single process mode we inform
dispatcher to stop handling any event processing once we have
deleted the main window.