Fix scalar replacement for classes (broken by r21945)

[Reviewed by David]

This commit fixes scalar replacement for classes which was broken by
r21945.

Specifically, when considering replacement for class objects, the code
only considers the variable if the first definition is an allocation
(a call to chpl_mem_alloc prior to r21945).  As of r21945, the
compiler inserted calls to chpl_here_alloc() require in a PRIM_CAST,
so we must now look for the cast as the first definition as well as
the call to the allocation in the previous statement.  Similarly, when
looking at the uses of the variable, the calls to chpl_here_free()
take an argument wrapped in PRIM_CAST_TO_VOID_STAR, and so this case
had to be handled.

As noted in the commit message for r21945, disabling scalar
replacement for classes exposed the iterator inlining bug.  This
commit reverts the .good files and removes the future that was added
for that issue.

Note: LeakedMemory5.chpl still leaks one extra object due to r21944
(using sublocales in leader iterators).  David is currently testing a
fix for it.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@21953 3a8e244f-b0f2-452b-bcba-4c88e055c3ca