bugfix: select lowpriosk before backupsk if bestsk is not valid

Apart from that, ensure that sk is set to NULL if bestsk, lowpriosk and
backupsk are NULL.