Store uniform block bindings in program binaries.

This affects all back-ends - we weren't saving this. Note that
bindings can only be set after program linking. The spec is fairly
clear in that any programs saved must be loadable and runnable under
the same set of state, which would include block bindings.

Also add validation for zero binary formats in GetProgramBinary.

Also add a workaround for AMD where the block bindings were not
applied properly after link, similarly to our original bug.

This CL also includes a few fixups for GLProgram (raii).

BUG=angleproject:1637

Change-Id: Iae068eb4e1e4c763aa9f9332c033e38708026c8f
Reviewed-on: https://chromium-review.googlesource.com/418393
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 1095017..d2d3a2b 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -4003,6 +4003,12 @@
         return false;
     }
 
+    if (context->getCaps().programBinaryFormats.empty())
+    {
+        context->handleError(Error(GL_INVALID_OPERATION, "No program binary formats supported."));
+        return false;
+    }
+
     return true;
 }