Add support for IP masks

This pull request adds support for IP prefix masking.

It also refactors LocalCompiler to use PrefixTable instead of PosNeg -- a more flexible representation that will enable us to use more kinds of patterns in the future.
Is there any use for the commented code in this module?