in: add in_mask2len()
Similar to the existing in6_mask2len() function, but for IPv4. This will be used
by pf's nat64 code.
Obtained from: OpenBSD
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D47785