Rewrite libpackagelistparser.

I was happy to ignore this as long as it wasn't being touched, but it's
been modified twice in the last year. Time to just throw it out and
rewrite it.

Also add some basic tests and put them in presubmit.

Bug: http://b/127686429
Test: new tests
Change-Id: Ie7e9406521291de0eab3138f55068cee6aaf365a
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 66d0c92..a3bd44f 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -19,6 +19,9 @@
       "name": "libbase_test"
     },
     {
+      "name": "libpackagelistparser_test"
+    },
+    {
       "name": "libprocinfo_test"
     },
     {