Clean up link validations on interface blocks

This patch intends to clean up the link validations on interface
blocks for better implementing program linking with geoemtry shader.
1. Move three interface block validation functions to the anonymous
   namespace of Program.cpp instead of the member function of class
   Program.
2. Use IsActiveInterfaceBlock everywhere we need to know if an
   interface block is active or not.

BUG=angleproject:1941

Change-Id: Ic868d015e45f04d57ba382a2b447be00952fa4fc
Reviewed-on: https://chromium-review.googlesource.com/965395
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/ProgramLinkedResources.cpp b/src/libANGLE/ProgramLinkedResources.cpp
index a372ff4..77940b0 100644
--- a/src/libANGLE/ProgramLinkedResources.cpp
+++ b/src/libANGLE/ProgramLinkedResources.cpp
@@ -814,8 +814,7 @@
 
         for (const auto &block : *shaderBlocks.second)
         {
-            // Only 'packed' blocks are allowed to be considered inactive.
-            if (!block.staticUse && block.layout == sh::BLOCKLAYOUT_PACKED)
+            if (!IsActiveInterfaceBlock(block))
                 continue;
 
             if (visitedList.count(block.name) > 0)