sched: move code into kernel/sched_stats.h