luci-base: fix logic errors in ipmask4 and ipmask6 datatype validators