[TensorPipe] Add extensive logging (#39781)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39781
Use a new feature of TensorPipe where a pipe can tell you the name of the remote endpoint, in order to make the logging messages more informative: whenever there is a failure on a pipe, say which worker this was to/from, and the ID of the message involved.
Also, add plenty of verbose logging, to help with debugging. This is off by default, but can be enabled by setting the `GLOG_v` env var to a value of 1 or higher.
ghstack-source-id: 105777704
Test Plan: Builds.
Differential Revision: D21973150
fbshipit-source-id: 9e3ce1b9977e1e9ecd91ff4a6fe82786dc79a702