Move state query validation out of Context.

Generate all GL errors in the validation helper functions, instead of
within the state manipulation logic and internals of Context.

BUG=angle:571

Change-Id: I7a3f540e2ae0f5f8c7126e2593717cc3200dd7e5
Reviewed-on: https://chromium-review.googlesource.com/200551
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
5 files changed