Initial support for controlling replay with gdb.

The new default behavior for --replay is to start a debug server (the
rr process) on localhost:[pid].  To get the old behavior, provide the
flag --autopilot.  From there on, the rr process handles requests from
gdb.  With this patch, rr can handshake with gdb and process a
"continue" request until the replayed program terminates.

(See newsgroup for a bit more discussion.)

Probably best for someone to take a look over the code briefly.  Will leave open for a few days.