added a promotion wrappers cache
added a promotion wrappers cache

The promotion wrappers cache avoids creating duplicate promotion
wrappers by caching them based on the function that is promoted, the
map from formal arguments to promoted types, and whether the promotion
uses brackets or parentheses.  This is necessary now to avoid creating
identical but incompatible iterator classes.  Why now?  I'm not sure,
but it seems reasonable that this could happen.

An added benefit of caching promotion wrappers is that the IR as well
as the generated code will now be more compact.

This fixes the following GASNet regressions:

  arrays/deitz/promotion/test_scalar_promote_method
  arrays/deitz/test_write_perm2
  npb/is/diten/is
  npb/is/diten/is_mt
  studies/hpcc/FFT/bradc/fft-perm
  types/complex/bradc/negateimaginary2

It does not fix the GASNet regressions:

  arrays/deitz/jacobi-no-inline
  arrays/deitz/jacobi-unoptimized

Nor does it fix the baseline regression:

  arrays/deitz/jacobi-no-local


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

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