Fix switching between HDMI and headphones automatically

This patch removes the code from module-switch-on-port-available that
ensures that no profile switching will happen when a new port is available
if the previously active one is still available too, which is the case when
you have the computer permanently plugged to a TV through HDMI and then
plug headphones to listen to them.

Additionally, this patch also takes care of switching back to a valid
profile when unplugging that new hardware (e.g. headphones), and it
implements that by looking for the best possible port available in the
same card, even if it's in a different sink.

NOTE: this only works when both the analog and HDMI ports belong to
the same card, otherwise it would still not switch back to HDMI when
the currently active port becomes unavailable (e.g. unplugging headphones).