cmake-gui: Unset empty CC,CXX on global generator change
On subsequent runs of configure from cmake-gui the global generator is swapped. So on runs other than the first it was setting CC and CXX to empty when they were otherwise undefined.
Instead, restore them if non-empty and unset them if empty when changing the global generator and a previous generator exists.
Fixes: #21449 (closed)
Edited by Brad King