testsuite: Fix running TH tests with profiled dynamic compiler
Previously, I had failed to update the ghc_th_way_flags logic for the profiled dynamic compiler.
In addition to this ghc_dynamic
was incorrectly set for profiled
dynamic compiler.
I also updated MultiLayerModulesTH_OneShot test to work for any compiler linkage rather than just dynamic.
Fixes #25947 (closed)