Add NetFromRange and NetFromInterval helpers
When retrieving set elements it can be desired to format the result in the same way nft would, which is merging intervals to CIDR representations. To make this easier, introduce helper functions which allow for conversion of IP address ranges to CIDR networks.
https://github.com/google/nftables/issues/346
When using this for the case described in https://github.com/google/nftables/issues/346, it also needs to be considered that nft will not print a CIDR mask if it is 32 / 128 - I'm not sure this should be considered in the functions introduced here (which I think would require having the functions return something other than net.IPNets) or in later logic.
Edit: I am thinking to add another function like FormatIpNet which takes an IPNet as input, and returns a string (either with or without the mask, depending on how nft would treat it).