Add UMA histograms and logging for bad IPC message handling

Many different places in the Chrome codebase handle unexpected IPC data
by killing the renderer. This can result in hard-to-debug sad tab pages.
Some, but not all, of these locations log an error; others record UMA
user actions. This CL fixes most sites to both log and record metrics.
It also switches the metrics to be histograms instead of user actions
because we don't need the extra timestamp data from user actions and
most of these sorts of metrics live in histograms.

BUG=462687
TEST=unit_tests

Review URL: https://codereview.chromium.org/1009583004

Cr-Commit-Position: refs/heads/master@{#321598}
diff --git a/extensions/browser/blob_holder.cc b/extensions/browser/blob_holder.cc
index f0146cdf..552c17a 100644
--- a/extensions/browser/blob_holder.cc
+++ b/extensions/browser/blob_holder.cc
@@ -11,6 +11,7 @@
 #include "content/public/browser/blob_handle.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_process_host.h"
+#include "extensions/browser/bad_message.h"
 
 namespace extensions {
 
@@ -77,7 +78,8 @@
     } else {
       DLOG(ERROR) << "Tried to release a Blob we don't have ownership to."
                   << "UUID: " << *uuid_it;
-      render_process_host_->ReceivedBadMessage();
+      bad_message::ReceivedBadMessage(render_process_host_,
+                                      bad_message::BH_BLOB_NOT_OWNED);
     }
   }
 }