cmRulePlaceholderExpander: Refer to the maps of the local generator

Each expander copied two maps of the local generator: the compilers and
the variable mappings.  The Makefile generators make one expander for
each object file, so CMake copied both maps once for each source.

Hold the maps by reference.  The local generator owns them.  Most
expanders are local objects, and the Fastbuild target generator holds
one as a member.  The local generator outlives all of them.  The
expander only reads the maps.  The operator[] calls never inserted a
key, because the local generator sets every key that ExpandVariable
asks for.  Thus at() gives the same result.

A warm re-run of a project with 500 libraries and 10000 sources uses
1.6% fewer instructions with Makefiles.

Issue: #28336
2 files changed