Move the error for pointers in structures earlier in the compile.

Bug: 21597073

This fixes an issue where a function argument is not checked for
compatibility until the reflected code generation (at which point the
message is far more cryptic). We do this by checking parameters for
externally-visible functions and externally-visible globals in our
ValidateType() routine.

Change-Id: I5ab9db1a11ed0e395c7623f1c9997632da057269
(cherry picked from commit ab94bccca64c9b126cbd1b732aa5e681d8639b99)
8 files changed