[CIDR] Add validation to mask_to_prefix to only work with IPv4.
[IP] Allow $bits to be passed to IP::inet_ptob($ip, $bits = null).