Extract channels and router in channel_test

Some code I hade in a previous PR to clean up the channel_test a bit so it iroves test suite's speed a bit.