Add x86_64 task switching (to be updated to new-style scheduler).