Work around occasional GetI18NCategory() failure in WndProc().

Also fix some variable-shadowing.
Exit from UI Menu Screen better. Fix crash under debugging if Pause Screen has ever been used.
Merge pull request #2059 from aquanull/patch-2

Fix some Windows-only crashes