Use a timer rather than idle events for processing the CEF message loop.

Also correctly notify CEF when we are closing the window and check for the window closing in the client handler.