Fix crash on shutdown with multiple scripts and other scripting improvements

* fixed crash on shutdown - closes #1821
* adds "Reload All Scripts" menu item - closes #1970
* adds "Stop All Scripts" menu item