Close extensions when disconnecting from workspace
When disconnecting from workspace, the extensions running on that workspace should be closed, since otherwise they will likely throw exceptions.
(from redmine: issue id 2447, created on 2016-12-12 by root)