I didn't like the last fix, here's another one, which is maybe a bit
neater?
We have a SourceModel that inherits from AbastractModel
AbastractModel inherits from both QObject and Ref.
When we call the destructor of Ref, that kills the
Pulseaudio::context that emits that the default source has changed during it's teardown.
Because the QObject destructor hasn't run yet, our signals are still
attached; however they refer to data from SourceModel which we've
already run the destructor on - hence crash.
This patch does the ref counting in an alternate way, destroying
the PA Context after our model has disconnected all the
signals, like it would be if the context was a child of the model.