1) Fire 'Terminate' event on every thread on script termination. Fixes bug #1548528.