Add rete optimizations described in https://github.com/rbrush/clara-rules/issues/3