Rewrite all Property related functions in terms of StringRef.

This was a bit tricky, especially for things like
OptionValueArray and OptionValueDictionary since they do some
funky string parsing.  Rather than try to re-write line-by-line
I tried to make the StringRef usage idiomatic, even though
it meant often re-writing from scratch large blocks of code
in a different way while keeping true to the original intent.

The finished code is a big improvement though, and often much
shorter than the original code.  All tests and unit tests
pass on Windows and Linux.

llvm-svn: 287242
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 24715ec..e66fb23 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -276,11 +276,9 @@
 
 Error Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
                                  VarSetOperationType op,
-                                 const char *property_path, const char *value) {
-  bool is_load_script =
-      strcmp(property_path, "target.load-script-from-symbol-file") == 0;
-  bool is_escape_non_printables =
-      strcmp(property_path, "escape-non-printables") == 0;
+  llvm::StringRef property_path, llvm::StringRef value) {
+  bool is_load_script = (property_path == "target.load-script-from-symbol-file");
+  bool is_escape_non_printables = (property_path == "escape-non-printables");
   TargetSP target_sp;
   LoadScriptFromSymFile load_script_old_value;
   if (is_load_script && exe_ctx->GetTargetSP()) {
@@ -291,7 +289,7 @@
   Error error(Properties::SetPropertyValue(exe_ctx, op, property_path, value));
   if (error.Success()) {
     // FIXME it would be nice to have "on-change" callbacks for properties
-    if (strcmp(property_path, g_properties[ePropertyPrompt].name) == 0) {
+    if (property_path == g_properties[ePropertyPrompt].name) {
       llvm::StringRef new_prompt = GetPrompt();
       std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes(
           new_prompt, GetUseColor());
@@ -302,8 +300,7 @@
           new Event(CommandInterpreter::eBroadcastBitResetPrompt,
                     new EventDataBytes(new_prompt)));
       GetCommandInterpreter().BroadcastEvent(prompt_change_event_sp);
-    } else if (strcmp(property_path, g_properties[ePropertyUseColor].name) ==
-               0) {
+    } else if (property_path == g_properties[ePropertyUseColor].name) {
       // use-color changed. Ping the prompt so it can reset the ansi terminal
       // codes.
       SetPrompt(GetPrompt());