Restore path mapping support with `layering_check`
path_mapping_test didn't set CC=clang and thus didn't actually cover the case of compilation with --features=layering_check. As a result, it wasn't noticed that 2dd545b4e4fe35aa04a70eacd5ab1ba621b3a09c regressed path mapping support for this feature.
Fixing this requires wiring up ParameterFileWriteAction with path mapping and allowing it to be opted in via execution info. Since opting in all such actions would cause breakages, offer a way to customize the mnemonic as the only API change - as a side effect, this brings back the CppModuleMap mnemonic.
RELNOTES: ctx.actions.write now supports path mapping when passed an Args object. Use the new mnemonics attribute to assign it a dedicated mnemonic, which can then be used with --modify_execution_info to opt in to path mapping (see https://github.com/bazelbuild/bazel/discussions/22658 for details on path mapping).
FYI @c-mita
CI should pass after https://github.com/bazelbuild/continuous-integration/pull/2324 has propagated to the images
@comius I sent https://github.com/bazelbuild/bazel/pull/26456 with just the ctx.actions.write change, PTAL.
@comius Thanks for merging the other PR, I rebased this PR onto master.