Compute the common mask from multiple IP addresses