Refactor about:sync's events framework

This CL changes the way we implement event callbacks on the sync
internals debug page.  We plan to rely more on this framwork in the
future.  This CL ensures we'll be building on a solid foundation.

It replaces chrome_sync.js's custom event listener implementation with
EventTarget from Chrome's internal JavaScript libraries.  Sync doesn't
require anything special in its implementation of event callbacks, so it
makes sense to use shared code for this.

Rather than defining a set of event listener callbacks, all events are
now routed through a single chrome.sync.events EventTarget.  From the
listener's point of view, this doesn't change much, since they still
need to register for a specific event type.  However, it does mean that
chrome_sync.js no longer needs to be aware of all the possible event
types.  Many of the event definitions have been moved into sync_log.js.

This change also introduces a new chrome.sync.handleEvent function to be
called from the C++ layer.  This new scheme will fail a bit more
gracefully than the old system would if the C++ and JavaScript list of
event definitions ever got out of sync.

Finally, this CL adds some more tests for the 'event log' tab of
about:sync.  This helps to ensure that the new system doesn't break
any existing functionality.

BUG=328606

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250835 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 250835
[Telemetry] Fix flow event importer error checks

BUG=342872

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250836 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 250836
Switch AccessibilityMode to be a bitmap.

This will allow us, in a follow-up CL, to add a new Accessibility mode: AccessibilityModeExtension, which may co-exist with the previously existing modes.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250837 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 250837