gensym each test re-export module individually

Fixes #16597
Address review comments, add tests
auto merge of #16892 : andrew-d/rust/andrew-fix-test-reexports, r=sfackler

Fixes #16597

I'm not 100% sure this is the correct way to handle this - but I wasn't able to find a better way without doing way more refactoring of the code that I was comfortable with.  Comments and criticism are appreciated :smile: