Cothread: Fix bug in catools

Turns out that we need a separate ca_flush_io() dispatcher for each
thread, otherwise we can end up blocking while we wait for the main
cothread to reach a suspension point.