Program::getUniformInternal: return only one array element

Reland with a compilation fix for GPU Builder, with a fix for
UniformTest.BooleanArrayUniformStateQuery and better formatting.

When getUniformInternal detected a mismatch between the glGetUniform
type and the uniform type, it entered a code path where it wrongly wrote
the whole array instead of a single element, causing a buffer overflow.

Adds a regression test.

BUG=595836

Change-Id: Ie860b87ad56046483650f457457116cc22bf3c0f
Reviewed-on: https://chromium-review.googlesource.com/334448
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index bd16fd9..b4aa8dc 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -2508,7 +2508,7 @@
         return;
     }
 
-    int components = VariableComponentCount(uniform.type) * uniform.elementCount();
+    int components = VariableComponentCount(uniform.type);
 
     switch (componentType)
     {