iflist: fix link type detection for tap devices

To distinguish between tun and tap devices based on link->kind,
we need to check hwaddr.type, otherwise all tun/tap devices
show up as tun.

fixes bnc#887564
ifup: fix <child> subnode of <match> generation

It should not check the w->device existance.
ifup: generate <link-type> directly from <device> gen.
dhcp4: use address class netmask if missed (bnc#887586)
Merge pull request #326 from kmroz/fix-309

iflist: fix link type detection for tap devices
Merge pull request #327 from pwieczorkiewicz/match_fix

ifup: fix <match> generation to reflect <child> relationship correctly
Merge pull request #328 from mtomaschewski/dhcp4-no-netmask

dhcp4: use address class netmask if missed (bnc#887586)
dhcp4: use a helper for netmask/cidr conversions
dhcp4: handle prefix-len 0 in cidr to netmask