New test helper for creating messages

This replaces all the various `mkmsg_*()` functions and methods scattered about the place.

The first commit contains the helper itself and the rest are just huge piles of changes from the old thing to the new thing.