test: Remove all uses of `~str` from the test suite.

r? @alexcrichton