Reapply "Update assignment client to close on WM_CLOSE message on Windows"

This reverts commit a603453cf21922cdb3c01b6352bdb43979968e5a.
Update ShutdownEventListener to not stop event handling
Merge pull request #3360 from huffman/fix-domain-server

Revert the revert and fix domain server