Allow out parameters to be set to NULL
'pending' test improved

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Memory leak in top level coroutine fixed

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Bug in cancel mechanism fixed
Minor beautifications

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>