Restore termination functionality when Observatory closes
Restore termination functionality when Observatory closes

Fixes #1268.

Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code