Adds an ability to inspect/remote-value Refs.

There's not much point putting the remote value in a local Ref, since we don't
track which remote objects are actually the same Ref object, we only look at
values. So instead, we put it in a map which identifies it as a Ref and gives
its (local) unique ID.
Add an optional 'thread' argument to repl/trace-fn.