Move some functions that aren't really XfsmManager-related into xfsm-global. (Old svn revision: 28026)