Cursor improvements

Adds a new/improved set of TD cursors, cleans up some Attack* plumbing, and adds a cleaned up version of the outside-range cursor changes from #4743.