Implied DO loops in READ and WRITE

Extend the LoopParseNode class to support implied DO looping for read
and write. More tests pass. Also clean up a few places.