core/sched: refactor SCHEDSTATISTICS