ubus: rework dumping IPv6 and IPv4 leases