core: allow killing tasks using PID

sched_task_exit(), which used to kill the active task, now calls
sched_task_kill() with the active task's PID