core: Add context switching for ARM and MIPS

ARM definitely compiles