[ozone] Implement Clipboard for Ozone platforms.

This patch provides a general clipboard implementation for Ozone.

The initialization happens automatically:
Clipboard::Create->ClipboardOzone::ClipboardOzone()->
AsyncClipboardOzone::AsyncClipboardOzone()->ClipboardDelegate::GetInstance().

where ClipboardOzone is a derived class from base::Clipboard,
AsyncClipboardOzone is a private helper class of ClipboardOzone, which
gets calls from it, makes requests and sends them to ClipboardDelegate.

TL;DR:
The ClipboardDelegate::GetInstance stores a singleton delegate instance,
which is stored automatically once clipboard delegate is created.
Each ozone platform, which uses clipboard, is responsible to create
own instance of ClipboardDelegate, which communicates with a system
clipboard. If a platform does not have own, the ClipboardDelegate::GetInstance
creates a FakeClipboardDelegate, which emulates the system clipboard in
such a way that it can pass unittests and provide copy/paste
functionality within browser.

The flow is asynchronous and based on requests.That is,
whenever a ClipboardOzone receives a Read/Write/GetMime
call, it forwards it to the helper AsyncClipboardOzone class, which
then creates a request (used for internal usage and holding
data filled by the ClipboardDelegate), calls to the delegate
and start an abort timer to make sure the request is not stalled.

What is more the clipboard data is cached and removed only when another
chunk of data is written to a system clipboard. And whenever the chromium browser is the
selection owner, the cached data is used.

components_unittests --gtest_filter=BookmarkUtilsTest*

Bug: 875168
Test: interactive_ui_tests --gtest_filter=ClipboardTest*
Change-Id: I0101aebe47cf2cac666f0434b6be2a9a11e2418c
Reviewed-on: https://chromium-review.googlesource.com/c/1361872
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630732}
10 files changed