core: remove thread_getpid

The inline function thread_getpid is not needed, since sched_active_pid
is a public variable anyway.