pv::DeviceManager now manages opening/closing devices

It also notifies pv::SigSession objects when their devices are
going to be cleared.
Stop capture before connecting to a device