glsl: do const parameter optimization for array element actual parameters

When a function parameter is const-qualified we can avoid making a copy
of the actual parameter (we basically do a search/replace when inlining).
This is now done for array element params too, resulting in better code
(fewer MOV instructions).

We should allow some other types of function arguments here but let's be
conservative for the moment.
1 file changed