trace_processor: clean up SystraceParser

The systrace line parser accumulated too much technical debt
and became a source of bugs. Refactor it to keep more readable.
Deliberate behavioral changes:
- Don't parse the counter value as double. ctrace seems to
  support only int values. Double can lose precision with
  pointers or anything larger than 2**53.
- Relax the parsing of "category groups" for counters, allow
  parsing of "C|543|foo|". We ignore the last arg anyways.

Also fix a borderline behavior I spotted in StringView. When
constructing a StringView(end(), 0), data_ is NOT nullptr even
though the string is empty. For that case, when calling
ToStdString() check the size_ not data_ nullity. data_ nullity
relies on std::string ctor to have a defined behavior when
calling std::string(out_of_bounds_ptr, 0). I couldn't find
any confirmation about this.

Change-Id: Ied7cd806c7f740e2cfad5e1854f956e1e4b4ef72
Bug: 189804795
diff --git a/src/base/string_view_unittest.cc b/src/base/string_view_unittest.cc
index bb00035..5bda159 100644
--- a/src/base/string_view_unittest.cc
+++ b/src/base/string_view_unittest.cc
@@ -34,6 +34,8 @@
   EXPECT_EQ(StringView("ax", 1), StringView("ay", 1));
   EXPECT_EQ(StringView("ax", 1), StringView("a"));
   EXPECT_EQ(StringView("ax", 1), "a");
+  EXPECT_EQ(StringView(reinterpret_cast<const char*>(0x100), 0).ToStdString(),
+            std::string(""));
   EXPECT_EQ(StringView("foo|", 3).ToStdString(), std::string("foo"));
   EXPECT_TRUE(StringView("x") != StringView(""));
   EXPECT_TRUE(StringView("") != StringView("y"));