Improved name mangling in codegen to follow the steps:
Improved name mangling in codegen to follow the steps:

1. mangle type names if they clash with other types

2. for each class type, mangle field names if they clash with types or
   other fields in the same class

3. mangle global variable names if they class with types or other
   global variables

4. mangle function names if they clash with types, global variables,
   or other functions

5. for each function, mangle formal argument names if they clash with
   types, global variables, functions, or earlier formal arguments in
   the same function

6. for each function, mangle local variable names if they clash with
   types, global variables, functions, formal arguments of their
   function, or other local variables

This should hopefully improve the robustness of clashes between the
names that the compiler generates.  This also decreases the amount of
mangling that is done such that local variables in one function are
not mangled based on the local variable names in another function.


git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@13399 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

sungeunchoi/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,hildeth/chapel,sungeunchoi/chapel,sungeunchoi/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,chizarlicious/chapel,chizarlicious/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,hildeth/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,chizarlicious/chapel,hildeth/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel