Report more data when syscalls fail in block.c.

I found a very rare (76th test run failed) failure in break_block, where
test_assert(1 == epoll_wait(epfd, &ev, 1, -1)) failed. To track this down
further we'll at least need the syscall result and the errno if the syscall
failed.
use pthread_barrier instead of sleep() in 'threads' test

Resolves #1199.
Get kcmp syscall number from syscall_defs instead of system headers.

Resolves #1209 (hopefully)
move syscallno into Task

x86 and x86-64 have wildly disparate syscall numbering schemes, so
anything dealing with syscall numbers is going to have to acquire some
32/64-bit awareness.  This patch is merely the first step in doing so.
Task seems like the best place to put the interface, even if the actual
implementation might not live on Task in the future.
don't return iterate_memory_map's value

It returns void, so the current code is legitimate C++.  But it's better
to just not have the return in the first place.
make read_segment_filter_t return bool instead of int
give memory_map_iterator_t an enum return value

It should only ever return an enum, so make that explicit in the types.
move push_tmp_mem and friends into restore_mem
make restore_mem a RAII class
add some protection against heap allocating restore_mem
Add safe downcast methods to Session.
Flush trace output stream in emergency_debug().

This can help with debugging.
Accept signal 0 as a signal which may be generated by PTRACE_INTERRUPT.

Resolves #1198.
Fix bug in static assert. 2^5 will not fit in a 6-bit int.
Move supported_arch to types.h since we're going to use it almost everywhere.
Remove leftover kernel ABI stuff from types.h.
Expose arch() getter on Registers.
Move supported_arch out of the rr namespace for now.
Move implementation of syscallname back out of Task so we can call it when we only have an arch, not a Task.
Make Event dumping use the arch from Registers to disambiguate the syscall.

This fixes a major testsuite regression. breakpoint_overlap depends on
the syscall names being present in "rr dump".