adding cursor system.

The cursor is a protocol for iteration. We also have some utilities to transfomr sets of cursors and have them step through ranges, etc.