Agents now tee logs to local and remote.

And a few related fixes. Still need some work on using the loggers.
Using context in tm RPCs.
Fixing unit test.