Dap: fix several issues with the Disconnect operation (bgo#724656)

DapInfoBar was not being destroyed on the main thread, which
could lead to crashes (I've seen some platforms more prone
to crash with this than others). Fixing this exposed other
synchronization issues, such as not checking for null in the
same thread as the one doing the operation on a widget, and
looping over a collection which could be modified, in which
case we need to make a copy of it before iterating.