support iteration on cursor

as e.g. the django ORM expect this to work