Move testing stuff to testutil

testutil will be used by delayd-bench
Merge pull request #42 from nabeken/add-testutil

Move testing stuff to testutil