Correctly insert unmangled function names to symbol table

This fixes detecting some cases of function parameter mismatch
(previously a mangled function name corresponding to no function
parameters was added to the symbol table for each user-defined function,
and this was returned when doing function lookups with no parameters).

Also fixes detection of reusing a function name as a variable/struct
name.

New unit tests are added to ensure that these fixes don't regress.

BUG=angleproject:936
TEST=angle_unittests, WebGL conformance tests

Change-Id: I2dadde9dcc01c7a4a653c1982c36377b89e6d437
Reviewed-on: https://chromium-review.googlesource.com/260800
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/SymbolTable.h b/src/compiler/translator/SymbolTable.h
index 8e2dfd7..397e4d6 100644
--- a/src/compiler/translator/SymbolTable.h
+++ b/src/compiler/translator/SymbolTable.h
@@ -288,6 +288,9 @@
 
     bool insert(TSymbol *symbol);
 
+    // Insert a function using its unmangled name as the key.
+    bool insertUnmangled(TFunction *function);
+
     TSymbol *find(const TString &name) const;
 
   protected: