Implement rule iterators.

Fixes #154.
Merge pull request #175 from wxsBSD/rule_iter

Implement rule iterators.