The `code` directive highlights all sources as GDScript. Other languages are
highlighted incorrectly at the moment, even if `.. code:: [language]` is
specified.
It does, however, work with the `code-block` directive. The reason seems to be
that this directive is Sphinx specific.
Fix syntax by removing multiple variable declarations on the same line, which GDScript does not (yet?) support, use clearer class and variable names, and rename the misleading "is_done()" function to "should_continue()", as the value returned (and returned by _iter_init() and iter_next() actually signifies the opposite: true means continue, false means stop. Also remove the superfluous do_step() function.
Closes#2433.
Co-authored-by: a e <afablee@gmail.com>