Factor out post-waitpid logic into did_waitpid.

This ensures we read the ticks counter after a waitpid from recorder_sched
and other non-Task::wait() callers, which doesn't seem to matter right
now but is the right thing to do anyway.