Move common tests by target file format (Wasm, MachO) into helper functions in `link.zig`, and sort alphabetically within for easier tracking versus file organization on disk.
`checkNotPresent` is the inverse of `checkNext` - if the phrase is found in the output, then it fails the test.