Switch profiles if needed after initializing the ALSA card

If the selected profile on pa_card_new() does not contain any
port marked as 'available', then look for the best alternative
profile containing 'available' ports, if it exists.

This patch avoids scenarios like starting with the analog-stereo profile
selected when there are neither built-in speakers nor an external
headset connected, even when the device is connected to an external
screen with audio capabilities through HDMI (so it could use the
available hdmi-output port from the the hdmi-stereo profile).