Rollforward of https://github.com/bazelbuild/bazel/commit/ec83598cb6ee4136166bb562a24dc5dfa58921db and the followup correction in https://github.com/bazelbuild/bazel/commit/44f92dd508824f2bae03e0e55dc4282908a562ec: Change the list of rc files accepted.

The rc list was:
- %workspace%/tools/bazel.rc (unless --nomaster_bazelrc)
- %binary_dir%/bazel.bazelrc (unless --nomaster_bazelrc)
- system rc, /etc/bazel.bazelrc or in %ProgramData% for Windows (unless --nomaster_bazelrc)
- the first of the following gets called the "user" bazelrc
  - path passed by flag --bazelrc
  - %workspace%/.bazelrc
  - $HOME/.bazelrc

The new list is hopefully a bit more consistent, as:
- system rc (unless --nosystem_rc)
- workspace, %workspace%/.bazelrc (unless --noworkspace_rc)
- user, $HOME/.bazelrc (unless --nohome_rc)
- command-line provided, passed as --bazelrc or nothing if the flag is absent.

This list removes two less than useful locations, duplication in the Workspace directory, and the rc next to the bazel binary. This location made sense at Google but is generally nonsensical elsewhere so we are removing it. It also stops the user local rc file from being overriden by passing in a custom file in --bazelrc.

In both old and new, --ignore_all_rc_files disables all of the above.
For a transition period, any file that you would have loaded but was not read will cause a WARNING to be printed. If you want the old file to still be read without moving its location, you can always import it into one of the new standard locations, or create a symlink.

Closes #4502, except for cleanup to remove the warning after a transition period of 1 Bazel version has passed.

RELNOTES[INC]: New bazelrc file list.

PiperOrigin-RevId: 209943385
diff --git a/src/test/cpp/option_processor_test.cc b/src/test/cpp/option_processor_test.cc
index 6048b80..f008d03 100644
--- a/src/test/cpp/option_processor_test.cc
+++ b/src/test/cpp/option_processor_test.cc
@@ -310,6 +310,12 @@
   ASSERT_EQ(expected, internal::DedupeBlazercPaths(input));
 }
 
+TEST_F(OptionProcessorTest, TestDedupePathsOmitsEmptyPath) {
+  std::vector<std::string> input = {""};
+  std::vector<std::string> expected = {};
+  ASSERT_EQ(expected, internal::DedupeBlazercPaths(input));
+}
+
 TEST_F(OptionProcessorTest, TestDedupePathsWithDifferentFiles) {
   std::string foo_path = blaze_util::JoinPath(workspace_, "foo");
   std::string bar_path = blaze_util::JoinPath(workspace_, "bar");