bluetooth: fix for headsets coming up with 'off' profile
Some BT headsets, eg. Sony Ericsson, the default profile is not
active and therefore PA eventually switches to the off profile.
So we end up with aBT card with no sinks/sources. The switchoff
happens between card hook firing and the module load ending.
Since our routing requests are tightened to the appearance/disappearance
of sinks/sources, such BT devices will not trigger any routing request
when it gets connected. Unfortunatelly there is no hook in PA for
module load.
The workaround is that we schedule a deferred check what will be executed
next time PA goes back to the mainloop after the BT module load is complete
(ie. not too significant delays).
In the check routine we find out how many sinks/sources the recently loaded
bluetooth card has, and if none we make a routing than.
Beautiful, isn't it?