core::rt: Fix an infinite recursion bug
core::rt: Change the signature of context switching methods to avoid infinite recursion