get_ptrace_eventmsg_pid should return a pid_t.
Eagerly read general-purpose registers when a task stops.

This lets us easily make Task::regs() const.

Apart from the code being a bit simpler, this will also let us handle SIGKILL
more robustly in the future --- ESRCH when getting the registers can be
treated as task death in did_waitpid instead of having to treat regs()
as fallible all over the code.
Clean up some #defines in task.cc.
If the process is dead when we attempt to read its registers in did_waitpid, treat that as an exit event.