Magn 4173

This Pull Request fixes an issue where the expression was being run during shutdown. When the graph is marked as modified, and it is in Run Automatically, a timer is used to throttle the actual calls to run the expression. When shutting down, the workspace is cleared, resulting in a call to Modified() which, because of the timer might schedule an expression to be run AFTER the engine controller, or other critical bits have been disposed. Additional null checks have been inserted to make double sure that we don't attempt to do things like set trace data without a valid reference to the engine controller.

This PR's branch is created from the Revit 2015 branch, because MAGN-4173 stipulated that this was a Revit 2015 problem. But, it is, in fact an application-wide problem, so once this PR is merged, these changes will be cherry-picked to master.

@pboyer PTAL