pdnssec: fix segfault in list-all-zones without type and a little cleanup