Swift: Fix paths to .swiftmodule files in multi-config generators
These files are generated into a subdirectory named after the configuration.
Original Description
The initial commits increase the amount of Swift testing done with the Xcode generator, but are not strictly needed to address the problem. The last two commits add a failing test for the problem and then fix the problem.
Fixes: #25864
Edited by Brad King