Make sioc test pass while the host system is offline.
Add rr support to let gdb create and delete checkpoints.

This is mostly straighforward. In Task::copy_state, from's hpc value may be
nonzero when we have stopped at a debugger breakpoint, so it's simplest just to
abandon the assertion and copy the hpc value to to's rbc_boost.
When invoking gdb, load gdb initialization file defining checkpoint commands.
Move trace_frame member from Task to Session and wrap in current_trace_frame() accessor.

This is actually per-Session state. Currently we store it on the Task
that the event is associated with, but that's not necessary. It's simpler to
have just one per Session. When we restore a checkpointed Session, we can
tell which trace_frame we were replaying when the checkpoint was created.
Move rep_trace_step state into Session.

We need to do this so we can resume a checkpoint that was taken in the middle
of a trace step.
Complete move of syscallbuf flushing state into Session.

We need to do this so syscallbuf flushing state can be copied when we create
a checkpoint and syscallbuf flushing can be resumed when we resume the
checkpoint.
Move DREQ_DETACH handling into process_debugger_requests.

This means its callers don't have to deal with it.
Add support for resuming a checkpoint that's between two rr events.

The main point here is to track in the Session whether the event described by
current_trace_frame() has been reached or not.
Debugger support for resuming explicit checkpoints

Some important changes here are to restart_session and the way we manage
the checkpoint used for bare "r" commands. We simplify things by having
restart_session take care of all the work of resuming from checkpoints; for
those cases we don't need to use stashed_dbg and we can just keep dbg current.
Now maybe_create_debugger only has to handle the case where we've actually
been replaying to find the desired rr event.
Assert that there are no breakpoints or watchpoints set when we clone a Session.
Override gdb's "restart" command to restart via "run c$N".

This simplifies the interface and lets us add more intelligence to the
restart command later.
Add explicit_checkpoints test
Add Session constructor/destructor instrumentation to help find Session leaks.
Refactor rbcs to be monotonically increasing.
Disable gdb pagination in tests.

Adds a -x option to rr to pass additional command files to gdb, and uses this
to pass src/test/test_setup.gdb in all gdb-related tests. This file contains
a command to disable gdb's pagination, which interferes with our test scripts.
Add support for performing instruction-by-instruction tracing when replaying
a specific trace event.

Set 'instruction_trace_at_event' in the debugger to a trace event number.
rr will single-step the tracee while replaying that event (e.g. when replaying
execution up to that event's syscall) and print the register state at each
instruction. Very useful for debugging divergences!

Also, may fix a bug where single-stepping the first instruction while replaying
to an event does not work. Definitely fixes a bug where try_one_trace_step was
reading uninitialized req.type in the first trace step.
Don't call destroy_buffers until we've actually entered the exit system call.

Calling destroy_buffers when our next system call is exit(), but before we've
actually reached that system call, currently causes us to ignore breakpoints
that would be hit between the current program point and the exit(), because
advance_syscall just ignores them.

Instead, after we've actually entered exit(), then call destroy_buffers. This
has the nice feature that we don't need flags for destroy_buffers anymore
because both callers call it after entering exit().
Update clone test to include a breakpoint in the cloned thread and test the child_tid functionality.
Add explicit_checkpoint_clone test to test checkpointing of thread state.

We had a nasty bug where, when deepforking a thread, we'd set_child_tid on the
new thread but forget to set its pid_futex. So when we later made a clone of
the new thread, we wouldn't call set_child_tid on that clone.
Fix more exit paths where we fail to destroy the debug context before we exit.