parameterize number of sub-lattices

Add a parameter to the `DistributedLattice` constructor so that the
number of lattices can be controlled, and use the default number in the
simpler constructor. Disallow the usage of only 1 sub-lattice, which
would be pointless with that algorithm. Add some tests and
clean-up/refactor where possible.
Move LabelMask into the distributed package

`LabelMask` is used only by the `DistributedLattice`, so it belongs in
the distributed package. Move `getLabelMasks` into the `LabelMask`
class, as well.