Copyright (c) 2012 Kevin Wellwood
All rights reserved.
This source code is distributed under the Modified BSD License. For terms and
conditions, see license.txt.
Shuts down the event manager and causes the thread in Run to return, if
the event manager is currently running. Any further calls to Queue_Event
or Trigger event will consume the event objects but do nothing.