Relate `DockerConfiguration` from `...platform.docker` to `...platform.build` since it contains build specific concepts. This commit also refactors a few other areas of the code to make it easier to support credential helpers in the future. Closes gh-45283