Bug #700: Make the user-facing CkExit() function idempotent
User code could get into trouble by having multiple dynamic calls to
CkExit(). This could arise in applications like state-space search,
where any object finding one of many solutions might call it. It could
also arise in other structures as well. When this happened, modules
that ran analysis and cleanup code at shutdown would be
short-circuited, and unpredictable results would ensue.
The CkExit() call itself was made idempotent by setting and checking a
flag indicating that the exit process was already in progress. Rather
than calling the same user-facing CkExit() again, modules with
exit-time operations now use a separate function, CkContinueExit(), to
advance the exit process.
Change-Id: I61652ae52b2059ea302c085c1391b4cecf9dd019