all over the place: use sched_active_pid

In many places we needlessly use `sched_active_thread->pid` whilst we
already have `sched_active_pid` with the same value, and one less
indirection.