If we have two signals to handle at the same time, discard an ignorable one instead of dying.

When a tracee receives a signal in a syscallbuf critical section,
goto_a_happy_place tries to step out of the critical section before
delivering the signal. During that process we might receive another
signal. This is difficult to handle 100% correctly and right now we
just assert and die.

However, if one of the signals is going to be ignored by the tracee,
we can just discard it instead of dying. This won't affect tracee
execution, but it does mean the debugger will not report the ignored
signal during replay. That is almost never going to bother anyone.

This patch discards the initial signal if it's ignorable. We could
add an extra patch that discards the new signal if it's ignorable, but
that's a bit trickier, and tests don't seem to need it, so I'm not
doing it here.
Avoid using C++ feature where a constructor calls another constructor in the same class.

Hopefully this will fix Travis-CI build.
Stop checkpoint tests as soon as one instance fails.

Otherwise output logs can be overwritten by later passing instances.
Fix multistep tests to really stop when one step fails.
Tests driving gdb should try to quit gdb before shutting down.

Sometimes pyexpect has trouble killing gdb. Telling gdb to quit
first seems to fix it.
move #undefs for syscall_defs.h macros to syscall_defs.h

Having these lists repeated wherever we use syscall_defs.h doesn't seem
like good practice.  It reduces clutter, especially with upcoming
changes to handle undefined syscalls in syscalls.h.  It's also easy to
miss undefining a macro (which, admittedly, is normally harmless).
add syscall numberings for x86-64

x86 and x86-64 have different syscall numbering orders.  Additionally,
x86-64 doesn't have syscalls that x86 does (usually because having
${SYSCALL} and ${SYSCALL}64 is redundant for x86-64).

Therefore, this patch does three things:

1. Introduces a SYSCALL_UNDEFINED_${ARCH} mechanism for handling
   non-existent syscalls on a given platform.
2. Adds a SYSCALLNO_X86_64 macro for similar purposes as the current
   SYSCALLNO_X86 macro.
3. Sprinkles SYSCALLNO_X86_64 macros about syscall_defs.h and related
   places.

Ideally, we'd check that syscall numbers defined after
SYSCALL_UNDEFINED_${ARCH} didn't have a corresponding SYS_foo
definition, but C++ makes that difficult.  I also haven't yet figured
out how this extends to the CHECK_SYSCALL_NUMBERS bits in
replay_syscall.cc.
replace SyscallsX86 with templated Syscalls class

I think this is what @rocallahan had in mind in his comment in #1206,
with the unfortunate wrinkle that enums can't be templated over.  So we
have to wrap things up in a templated class and use typedefs instead.

Switch from enum classes to plain enums to make referencing them easier.
We never use the enum class-ness of the syscall numbers anyway.
add x86_64 to supported_arch

This change doesn't, of course, imply that we really support x86_64, but
it's a necessary step towards being able to define syscall numbers for
x86_64.
add SyscallsX86_64 "enum"

This patch is a proof-of-concept patch showing off how the bits from
earlier parts of this patch series might work.