Fix for verify failure in recordWithRefCopyFns

Auto-copy calls were being inserted in the parallel() pass.  These calls were not being
passed through insertReferenceTemps, which inserts reference temps as necessary to make
the reference level of the formal and actual arguments match up.  Since this step was
skipped, verify() flagged it reference level mismatch as an error.

For a quick fix, I added a call to insertReferenceTemps() after the offending call is
inserted into the tree.  A more general solution would involve moving that mini-pass later
in translation or calling it redundantly after any pass that inserts additional calls to
functions that might contain formals having ref intent.

Removed the recordWithRefCopyFns.future and recordWithRefCopyFns.skipif.

TODO: Make a general sweep of the passes that occur after callDestructors and ensure that

###DETAILS
####compiler/include/passes.h
####compiler/resolution/callDestructors.cpp
Factored out a per-call version of insertReferenceTemps(CallExpr*) and inserted this into
the global namespace.

####compiler/passes/parallel.cpp
Call insertReferenceTemps(autoCopyCall) after the autoCopyCall is inserted.
Introduce the predicate expr::isStmtExpr()
Exploit the new isStmtExpr() in deadExpressionElimination
Introduce isInCForLoopHeader and use this specialized version in deadExpressionElimination
Add new test to check for early destruction of records

Records inside a global tuple are autoDestroyed too early when the
record contains a member with a type such as an array. This causes the
use of an invalid pointer, and can lead to segfaults, double frees and
similar errors.
Fix tuple early autoDestroy bug.

In cullExplicitAutoDestroyFlags(), expand the effect to also include "regular" insert auto
destroy flags.

This function removes the autoDestroy flags from values that are copied (through a move)
into the return value variable of a function.  The case that was resolved before dealt
only with explicit autodestroy flags, but since tuples are created through a call to
_build_tuple_always rather than a constructor call (which would be an explicit new), it is
necessary to add the "normal" auto destroy case to the routine.

The original code was written to be very narrow, to avoid surprises.  But testing should
reveal if there are any associated with this small expansion.
Move iterator support functions out of ChapelArray and into a new module

Added a new internal module for iterator support functions and moved the
functions out of ChapelArray.  Updated tests that expected errors/warnings
from these functions to come from ChapelArray.  Updated a test that counts
dead modules to expect one more.
Merge pull request #859 from noakesmichael/StmtExpr

Add a predicate to determine if an expression is a "Statement Expression" and apply
the predicate in deadExpressionElimination (which is itself a short-hand for 
deadStatementExpressionElimination).  Convert deadExpressionElimination to use
a specialized version of the code to check for expressions in LoopHeaders; it only
needs to check for expressions in CForLoop headers.

Compiled: STD Clang/Darwin, STD GCC/Linux64
Tested: Full STD regression suite
Review: None
Move some record tests to a more appropriate directory.

These tests were living under test/arrays/ but they don't contain any arrays,
and are actually testing record functionality.  I decided to move them to
test/types/records because that seemed the more logical place.
Merge pull request #862 from lydia-duncan/reclassifyDeitzRecordTests

Move some record tests to a more appropriate directory [trivial]

These tests were living under test/arrays/ but they don't contain any arrays,
and are actually testing record functionality. I decided to move them to
test/types/records because that seemed the more logical place.
Merge pull request #860 from hildeth/fixTupleEarlyAutoDestroyBug

Fix tuple early autoDestroy bug.



In cullExplicitAutoDestroyFlags(), expand the effect to also include "regular" insert auto
destroy flags.

This function removes the autoDestroy flags from values that are copied (through a move)
into the return value variable of a function. The case that was resolved before dealt
only with explicit autodestroy flags, but since tuples are created through a call to
_build_tuple_always rather than a constructor call (which would be an explicit new), it is
necessary to add the "normal" auto destroy case to the routine.

The original code was written to be very narrow, to avoid surprises. But testing should
reveal if there are any associated with this small expansion.

[t: std, --verify, --no-local, gasnet(distributions)]
Merge pull request #857 from Kyle-B/kb-add-record-tuple-test

Add new test to check for early destruction of records
Merge pull request #861 from daviditen/iteratorSupportModule

Move iterator support functions out of ChapelArray and into a new module

Added a new internal module for iterator support functions and moved the
functions out of ChapelArray. Updated tests that expected errors/warnings
from these functions to come from ChapelArray. Updated a test that counts
dead modules to expect one more.

[reviewed by lydia-duncan]
Run shootout tests only on new perf machine.

Per discussion with @ronawho.
Merge pull request #863 from thomasvandoren/only-run-shootout-tests

Run shootout tests only on new perf machine.

Per discussion with @ronawho.
Merge pull request #852 from hildeth/fixRecordWithRefCopyFns

Fix for verify failure in recordWithRefCopyFns



Auto-copy calls were being inserted in the parallel() pass. These calls were not being
passed through insertReferenceTemps, which inserts reference temps as necessary to make
the reference level of the formal and actual arguments match up. Since this step was
skipped, verify() flagged it reference level mismatch as an error.

For a quick fix, I added a call to insertReferenceTemps() after the offending call is
inserted into the tree. A more general solution would involve moving that mini-pass later
in translation or calling it redundantly after any pass that inserts additional calls to
functions that might contain formals having ref intent.

Removed the recordWithRefCopyFns.future and recordWithRefCopyFns.skipif.

TODO: Make a general sweep of the passes that occur after callDestructors and ensure that

###DETAILS
####compiler/include/passes.h
####compiler/resolution/callDestructors.cpp
Factored out a per-call version of insertReferenceTemps(CallExpr*) and inserted this into
the global namespace.

####compiler/passes/parallel.cpp
Call insertReferenceTemps(autoCopyCall) after the autoCopyCall is inserted.