Rewrite clipboard write IPC handling to be easier to understand.

The original implementation sent clipboard data to be written over IPC
as a map of clipboard formats to 'parameters' for that format. The
parameters were just vectors of byte vectors. Needless to say, this
logic was complicated, fragile, and prone to bugs. In the browser
process, this resulted in the IPC validation logic being scattered
between ClipboardMessageFilter and Clipboard::DispatchObject.

The rewrite adds an IPC message for each flavor of data that the
renderer is allowed to write to the clipboard. On the browser side,
the logic is simply delegated to ScopedClipboardWriter. Since the
clipboard object map is no longer under the control of an untrusted
process, this allows the removal of a lot of validation logic.
Unfortunately, bitmap handling is still a bit complicated because it's
sent over shared memory, but all the validation logic has been moved
into ClipboardMessageFilter.

BUG=319285

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

Cr-Commit-Position: refs/heads/master@{#304895}
30 files changed