Add cross-platform Workarounds to Context. These are distinct from the renderer-level workarounds. Add the first workaround, loseContextOnOutOfMemory. This is enabled when the application enables reset notifications via KHR_robustness, and is intended for more robust handling of errors in key APIs for Chromium's correctness (in particular, sync objects). Change Context::getResetStatus to persistently return the "lost" status if it was set by calling Context::markContextLost. Previously, if markContextLost was called but the implementation hadn't actually received an error like a lost device, the "lost" reset status would be dropped. Returning it only once to the caller is also fragile. Tested this by manually injecting a failure in FenceSync11::clientWait and ensuring that Chromium detected it as expected. BUG=chromium:650138 Change-Id: Ie53069eacd1754ad5d64936e3fef315af24605fa Reviewed-on: https://chromium-review.googlesource.com/394233 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>