Refactor and add support for custom rules.

Refactor domain language and refactor how protocols are tested so that there are two test functions; testRule and testPropertyRule. Add support for custom rules (do not expose the API).
Bump version numbers to 0.1.0