* reqReq did not reset lastReq to reqNil, this caused problems in the
new tasyncitermacro test. (await accept stopped accepting requests after
some arbitrary amount have been accepted).
* Rewritten and moved tasyncitermacro to tests/run/ so that the tester
actually tests whether it works at runtime.
* tasynciterraw is now a copy of tasyncitermacro after macro expansion.
It will be used as a control test, useful if the macro starts generating
incorrect code.
* The async proc is now invoked immediately after the 'await' request
is processed. This means that the iterator is executed until it yields
with a request which cannot be immediately satisfied (e.g. readLine)
after which point a
select() call will need to be made. Previously the async proc would only
be added to the list of requests, the event loop would need to start
over and thus would need to go
through each request again before invoking the iterator and reaching a
request which could not be immediately satisfied.
* This was implemented by recursively calling the processWorker
procedure in asyncio.nim. In the future it may be of benefit to also
perform this for reqReg.
* When the awaited user-defined async proc finishes, the parent worker
will be executed, the same optimisation has been used for that case.
* The way that this optimisation is implemented means that even multiple
levels of awaited user-defined procs will be quickly processed. (Look at
the tasyncitermacro test, the auth procs are arranged this way to test
this)
It failed because a Natural cannot be negative but drawEllipse tried to
set negative values to a Natural variable; this variable's type was
changed to an Int.