cmTarget: Refactor GetLocation API

When given a non-NULL configuration the GetLocation returned the
location for the given configuration.  When given a NULL configuration
the GetLocation method returned a location with the build-system
placeholder for the configuration name.  Split the latter use case out
into a separate GetLocationForBuild method and update call sites
accordingly.
Merge topic 'dev/string-apis' into next

447816f0 cmTarget: Refactor GetLocation API