Refine error codes into TOR or TGEN errors.
With this change we include more detailed error codes in visualization output. In order to do so we map TGen transfers/streams to TorCtl STREAM event details based on source ports and unix_ts_end timestamps. This code reuses some concepts used in metrics-lib. Implements tpo/metrics/onionperf#34218.