Handle stack overflow exception on Windows 64-bit (amd64). Consolidate platform independent parts of stack overflow handling (case 591917)