Introduce Dygraph.createIterator, and use it to simplify the code in drawTrivialLine...