Expose custom rule API.

Add function registerRule() to protocolKit to expose the API to add a custom rule.