Fixes tests to use the loopback address whenever possible. It also fixes some safe publishing issues, or add diagnostics in some of the tests. Reviewed-by: michaelm
Fixed intermittently failing tests Reviewed-by: chegar
Reviewed-by: darcy, ihse