Move testing stuff to testutil

testutil will be used by delayd-bench
should be fix to use auto-ack