Fixed the COM_Begin/EndParsingSession functions.

So the COM_EndParsingSession function is quite useful after all. It is
indeed needed as there are some places in the code where parsing sessions need to nest
(one example is in the UI_LoadMenus function, which eventually calls
UI_ParseMenu. Both of these functions require their own parsing session).
I've added some extra debug-only code in COM_BeginParseSession which will
throw a fatal error if there are too many nested parsing sessions
(currently hardcoded to 2).