Methods for subsequent memory leak fixes

Background
-----
This pull request represents a smaller chunk of a larger work (happening on [Plumber branch](https://github.com/Benglin/Dynamo/tree/Plumber)), making code review process more manageable. It exposes methods that will be called eventually when the full memory leak fix goes in, but for now, these new methods are not called in anyway.
As of this submission this ```shutdownEvent``` will never be signaled (because ```DestroyInternal``` method is not currently called by anyone). The net result of this is the existing behavior -- heartbeat thread is left to die with the application shutting down.