templatize syscallname's implementation
templatize replay_syscall.cc's before_syscall_exit
templatize replay_syscall.cc's process_socketcall
templatize process_restart_syscall
templatize process_{execve,clone}
templatize process_mmap and underlying implementation
templatize rep_after_enter_syscall's implementation
templatize rep_maybe_replay_stdio_write's implementation
templatize rep_process_syscall's implementation
fixup SYS_restart_syscall fuzziness

We don't handle SYS_restart_syscall as a normal syscall, so it wasn't
present in syscall_defs.h, and therefore wasn't getting defined in
the *_arch structures in kernel_abi.h.  But it does vary between
architectures and we depend on the value, so we need to define it there.
templatize recording's init_scratch_memory
templatize rec_prepare_restart_syscall's
templatize rec_before_record_syscall_entry's implementation
Rename TraceOfstream::flush to TraceOfstream::close.

When we implement compression, it's annoying to implement flush-without-closing.
Add CompressedReader/Writer for multithreaded zlib compression of streams.
Use CompressedReader/CompressedWriter for trace I/O.

Resolves #700.
Add -s option to 'rr dump' to dump statistics --- currently, compression statistics.
Add -b option to 'rr dump' to dump syscallbuf records.
Better error checking.
Disable slack in advance_to.