Fixed the switch_thread and ainv_wait asm entries. Everything works
fine now!

Still a couple of syscalls not changed to use new convention:
buff_mgmt and idle. Will come back to them later.