logcat: white and blacklist failure

- logcat improperly squashes out count
- logcat test enhanced to catch failure
- logd places entries in ascending sorted order

Change-Id: If39d8e2c40852b520c98e7840034ab63c2538e5d
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index 5960609..5a80efe 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -807,7 +807,10 @@
         // squash out the byte count
         cp = buf;
         if (!truncated) {
-            while (isdigit(*cp) || (*cp == '\n')) {
+            while (isdigit(*cp)) {
+                ++cp;
+            }
+            if (*cp == '\n') {
                 ++cp;
             }
         }