Fix bug in cache
Stop adding duplicate fences in waitFor

Fences I added here are also added by the compiler
when --cache-remote is enabled, but they don't do
anything if --cache-remote is not enabled, so they
don't need to be explicitly included here.
Relax task counting fences, add barrier fence

The task counting atomics don't need to imply fences
as these are handled elsewhere and we're really just
updating a counter.

For the barrier here, it's waiting on (not atomic)
local memory to change from a remote locale's put - which
is not legit according to the memory model... add
a fence (but I'd like to see a better barrier).
Changes through Tuesday mid-day.
Merge branch 'master' of github.com:chapel-lang/chapel into REG-TRI
Wednesday updates.
Today's changes.
Fix problems with NetworkAtomics from r23794

r22107 fixed some wrong return types for Atomics.chpl,
and r23435 and r23472 fixed that for NetworkAtomics.chpl,
but my patch r23794 inadverdently undid some of these changes.

Here I put the changes back. Some other notes:
 - I added explicit return types to read and peek methods.
   That seemed to make it fit in better but the corresponding
   change would also need to be done in Atomics.chpl for peek.

 - I did not add :void return types to e.g. add or sub methods,
   but somebody could do that if it's important to match the style
   used in Atomics.chpl

 - I fixed peek and poke for ratomicflag to work with bool instead
   of int(64).

Tested with 'make check'.
Merge remote-tracking branch 'upstream/master' into cache_fixes
Comment fix.
Add local blocks to the BlockStmts walked during return path checking

The statements in a local block should be walked in isDefinedAllPaths in the
same way as for plain BlockStmts and do-while BlockStmts.  This gets rid of the
warning in users/ferguson/local-return.chpl, so remove that .future and .bad.
Move fence to top of loop, comment changes.
Responds to Greg's request.
Adding my changes to the minimalModules test. With default initialization,
these tests would not work otherwise.
This adds the compiler generation of the defaultOf for externs, and removes
the previous handling of externs from functionResolution.
Adds compiler functionality for a module-defined _defaultOf function for each
type.

Summary of changes:
buildDefaultFunctions - generates the _defaultOf function for record types.
  Inserts accesses to the type's type and param fields such that these can be
  grabbed in function resolution and sent to the correct constructor.  Default
  initializes the remaining fields unless the constructor has a default
  expression in its function header.

callDestructors - In changeRetToArgAndClone, instead of only alterring the first
  use of the old return symbol, alter all the uses to copy the updated value of
  the return parameter into the old return symbol before actions happen to its
  remaining uses.

functionResolution - Replace the varying actions to types depending on flags,
  defaultValues, etc, with calls to the _defaultOf method of that type (which
  should do the varying actions for it).  Except distributions, which require
  a little more functionality to utilize a _defaultOf function.  Distributions
  can't generate a _defaultOf method in the module code because our construction
  via type aliases (new <alias>()) does not work when the alias was not created
  in a straight-forward way, and buildDefaultFunctions can't generate a
  _defaultOf method because it doesn't have enough type information to insert
  the proper calls.
Today's updates.
Adds the _defaultOf generation for tuples.

Not all type information or substitutions for tuples are known by the time
buildDefaultFunctions comes around, but it needs to have a _defaultOf method
around to instantiate by the time functionResolution rolls in for generic
instantiation.  So create a stub in the former and fill in the body in the
latter.
Add the _defaultOf function for booleans
Add _defaultOf for inits, reals, and imags.
Add _defaultOf method for enums.