This commit ensures that, when creating a RestClient.Builder from a RestTemplate, the UriBuilderFactory is only copied if it has been changed from the default values. Before this commit, the UriBuilderFactory was effectively alway copied, resulting in not being able to use a baseUrl. This commit also introduces a small memory optimization in DefaultUriBuilderFactory, so that default environment variables are created lazily. Closes gh-32180