b=1045482 make XErrorTrap installation and removal thread-safe r=jesup

Error handling is now applied to the Display using async_handlers, instead of
replacing and trying to reinstate the XSetErrorHandler() global handler for
all Xlib Displays.

Inspired by use of the same Xlibint.h structures at
https://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkasync.c?id=0e1a4248#n252
https://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkasync.c?id=0e1a4248#n150
Compare use of _XAsyncErrorHandler in libX11.

--HG--
extra : rebase_source : 8bb16f09912b15e435441657e7275c9213b1a475
Bug 1047220 - Shrink the static atoms table. r=bz.

--HG--
extra : rebase_source : a7f8d54cce7f20d784371348f0d0cabdacf43c0a
Bug 1045096.  Make sure initial about:blank in iframes have a nsDOMNavigationTiming object, so we don't end up with window.performance throwing when accessed on their window. r=smaug
Bug 1046101 part.1 Rename nsEventStructType to mozilla::EventClassID r=smaug
Bug 1046101 part.2 Rename NS_GUI_EVENT to eGUIEventClass r=smaug
Bug 1046101 part.3 Rename NS_INPUT_EVENT to eInputEventClass r=smaug
Bug 1046101 part.4 Rename NS_UI_EVENT to eUIEventClass r=smaug
Bug 1046101 part.5 Rename NS_KEY_EVENT to eKeyboardEventClass r=smaug
Bug 1046101 part.6 Rename NS_COMPOSITION_EVENT to eCompositionEventClass r=smaug
Bug 1046101 part.7 Rename NS_TEXT_EVENT to eTextEventClass r=smaug
Bug 1046101 part.8 Rename NS_QUERY_CONTENT_EVENT to eQueryContentEventClass r=smaug
Bug 1046101 part.9 Rename NS_SELECTION_EVENT to eSelectionEventClass r=smaug
Bug 1046101 part.10 Rename NS_EDITOR_INPUT_EVENT to eEditorInputEventClass r=smaug
Bug 1046101 part.11 Rename NS_MOUSE_EVENT to eMouseEventClass r=smaug
Bug 1046101 part.12 Rename NS_DRAG_EVENT to eDragEventClass r=smaug
Bug 1046101 part.13 Rename NS_MOUSE_SCROLL_EVENT to eMouseScrollEventClass r=smaug
Bug 1046101 part.14 Rename NS_WHEEL_EVENT to eWheelEventClass r=smaug
Bug 1046101 part.15 Rename NS_POINTER_EVENT to ePointerEventClass r=smaug
Bug 1046101 part.16 Rename NS_GESTURENOTIFY_EVENT to eGestureNotifyEventClass r=smaug
Bug 1046101 part.17 Rename NS_SIMPLE_GESTURE_EVENT to eSimpleGestureEventClass r=smaug