Save interrupted syscalls on the event stack for future reference.

Note: this patch keeps around the previous task->last_syscall
machinery for cross-checking purposes.  Otherwise it's subsumed.

Resolves #329.  Also a big chunk of #293.  This code almost certainly has issues with some types of signal "re-entry" and syscall restarts, but we'll cross that bridge with tests in hand for #293.