Build egl_display extension string using temporary vector

Currently it is very easy to forget to add a trailing space when adding to the extension string. This has already caused a major bug fixed by 0bc64a80291111ad9356377e7247acdf77325e75.

Build the string using a vector instead similar to libANGLE::Context::initExtensionStrings() does it. This is much less error prone than the current code.

Test: Added unit test
Test: Ran atest EGL_test
Test: Confirmed string output is the same with print
Bug: 285606242
Change-Id: I7f837a3009f0ccfedcf44f3d7ff709a269d0034f
diff --git a/opengl/tests/EGLTest/Android.bp b/opengl/tests/EGLTest/Android.bp
index d96a895..aebd3f2 100644
--- a/opengl/tests/EGLTest/Android.bp
+++ b/opengl/tests/EGLTest/Android.bp
@@ -37,6 +37,11 @@
         "libSurfaceFlingerProp",
     ],
 
+    static_libs: [
+        "libgmock",
+        "libgtest",
+    ],
+
     include_dirs: [
         "frameworks/native/opengl/libs",
         "frameworks/native/opengl/libs/EGL",