Removed dependency of ScopeExit on LocalFunction (by duplicating some utiliy LocalFunction macros in the ScopeExit header).