ip-mask: reorg into Pattern.Ip submodule, fix meet

Move ip mask-related operations to a submodule of Pattern to keep the
namespaces organized. In addition, reimplement the operations in terms
of the shift operations, which was redundant with the compatible
operation.

There was also an issue with the meet operation not returning the most
exact result. Consider these two masks:

  11000000.0.0.0/4
  11010000.0.0.0/4

Their meet is 11000000.0.0.0/2, but the previous implementation would
have returned 0.0.0.0/0.
ip-mask: Expose Pattern.Ip format and string_of functions
ip-mask: quickcheck tests for ip pattern
ip-mask: strengthen lattice quickcheck properties

Some of the tests that were ifs should have actually been iffs.
ip-mask: rename meet to join

Join goes up (least upper bound) and meet goes down (greatest lower
bound).