Utils: Fix more than one template replace

There is a bug in templateCharReplace function that only the first
template gets replaced correctly and additional templates are left
unchanged.

Add a new test case twoReplacementsWithMath2 to show the issue.
Difference with the existing passing test case is key string
"ADDRESS" is less than "BAR".
    nlohmann::json j = {{"foo", "4 / 2 equals $ADDRESS / 2 $BAR"}};
    data["ADDRESS"] = 4;
    data["BAR"] = std::string("bar");

With this change the new test case passes.

Tested:
All unit tests passed.

Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: I121ec8c0fcfce645f52518ed4429228549ff9371
diff --git a/src/Utils.cpp b/src/Utils.cpp
index f859eb6..48c600a 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -373,9 +373,13 @@
             }
             keyPair.value() = result;
 
-            // We probably just invalidated the pointer above, so set it to null
-            strPtr = nullptr;
-            break;
+            // We probably just invalidated the pointer abovei,
+            // reset and continue to handle multiple templates
+            strPtr = keyPair.value().get_ptr<std::string*>();
+            if (strPtr == nullptr)
+            {
+                break;
+            }
         }
     }