lit.cfg: move the DYLD_LIBRARY_PATH setting code to the config.substitutions
This change the order the configuration file to something that makes more sense: the platform_module_dir value was being set in the middle of the config.substitutions phase.
We needed said value for setting the DYLD_LIBRARY_PATH, so that code was added right after it.
The problem is that by that time config.substitutions.append(('%target-run', config.target_run)) has already happened for local targets
This change moves all said code to just before the substitutions phase, much cleaner and resolves rdar://problem/49835064