This moves over setup code for the loopback latency test into a private library so that we can easily write more tests using the same framework.