Added call to  PluginManager.WndProc(ref msg) on WM_QUERYENDSESSION and WM_ENDSESSION