networkctl: use safe_qsort in case no links are present

Unlikely to happen but still...