This function cleans the name space stack. This cleaning does not need to be done during syntax analysis. It is needed after the analysis has been done to detect unclosed modules.
Note that the main:: module is implicit and can not and should not be closed unless it was explicitly opened.
The function calls the report function if the name space is not empty when the function is called.
void ex_CleanNameSpaceStack(peXobject pEx