Clean up FIFO tasking and get it mostly working with GASNet comm.
Clean up FIFO tasking and get it mostly working with GASNet comm.

[Reviewed by Tom.]

This is a cleanup commit following r21331.  It does the following.

- Set task private data appropriately when the initial task descriptor
  is created in chpl_task_init(), supporting tasking operations prior
  to the point at which the user main becomes a real task.

- Set vacuous task private information in the comm (polling) task.
  Except, as a temporary hack, set the allocator function pointers in
  the comm task to point to the corresponding functions in the memory
  implementation.  This is done so that "on" wrapper tasks, which will
  inherit their task private info from the comm task, can do allocations
  in the module code without setting the allocator function pointers
  themselves beforehand.  (Eventually "on" wrappers will be emitted to
  set these pointers, but that code isn't done yet.)  Without this, we
  cannot test effectively.

- In add_to_task_pool(), fix a minor bug: the new task should inherit
  all of its task private information *except* its serial state from its
  parent.  The child's serial state is given as a parameter to the call.
  Without this, an "on" wrapper task that represents the moved execution
  of a parallel task will inherit serialness from its immediate parent,
  the comm task, rather than inheriting the serial or parallel state of
  its true parent on the originating locale.

- In chpl_taskProcessTaskList(), clean up the code that causes a child
  task to inherit its task private information from its parent.

- Move the chpl_data member of a task pool descriptor before the next
  and prev pointers.  In a C struct that implements an element of a
  linked list, I like the linked list pointers to be the last members.

- Clean up indentation and white space in a couple of places.

With these changes, a full test run with comm=gasnet and tasks=fifo
resulted in the following failures.  One thing to note with regard to
these is that they don't represent problems with this commit as such.
Rather, they reflect the impact of the hierarchical locale work in
general, because that hadn't been run with comm=gasnet before this, or
at least not since long before the locale-aware memory work went in.
Another thing to note, as a matter of curiosity: in many cases the
failures are in tests whose correctness is at least partially dependent
on the comm counts.  For many of those, the change is that we now do a
few more GET operations.  And for many of those, the added number of
GETs was divisible by 12.  I don't know the significance of this.

memory/sungeun/refCount/domainMaps.good
memory/figueroa/LeakedMemoryArrayOfClasses
memory/figueroa/LeakedMemory5 (compopts: 1)
memory/figueroa/LeakedMemory2
  More leaked memory.

memory/shannon/memmaxExceeds
  Changed source line number for "error: Exceeded memory limit".

performance/sungeun/multilocale/atomics
performance/sungeun/multilocale/syncsingle
multilocale/deitz/needMultiLocales/streamCommCheck
multilocale/deitz/needMultiLocales/raCommCheck (compopts: 1, execopts: 1)
  Changed comm counts: more GETs.

multilocale/deitz/needMultiLocales/raCommCheck (compopts: 2, execopts: 1)
  Changed comm counts: more GETs, changed FORKs.

multilocale/deitz/needMultiLocales/dist/test_private_space
  Changed comm counts: more GETs.

arrays/deitz/part7/test_descriptor_frees
  Changed memory amount: more leaked memory.

[Error matching compiler output for users/vass/crash2VarSymbolTypeNULL
  Unresolved call (compile time).

parallel/taskPar/sungeun/barrier/commDiags
  Changed comm counts: more GETs.

studies/madness/aniruddha/madchap/test_gaxpy
  Timed out.  In 3 reruns with a 600 second limit, seemed variable: wall
  times (including compilation) were 100 sec, 403 sec, and 301 sec. 

studies/madness/aniruddha/madchap/test_likepy
  Timed out.  In 3 reruns with a 600 second limit, timed out every time.

studies/ssca2/performance/SSCA2_commDiags (compopts: 1)
studies/hpcc/CommDiags/stream_commDiags (compopts: 1)
studies/hpcc/CommDiags/ra_commDiags (compopts: 1, execopts: 1)
  Changed comm counts: more GETs.

studies/hpcc/CommDiags/ra_commDiags (compopts: 2, execopts: 1)
  Changed comm counts: more GETs, changed FORKs.

classes/figueroa/RecordDestructor1
  Record destructor didn't get called (?).

distributions/robust/arithmetic/performance/assign
distributions/robust/arithmetic/performance/assignAlias
distributions/robust/arithmetic/performance/alloc_all
distributions/robust/arithmetic/performance/reduceSlice
distributions/robust/arithmetic/performance/reduce
distributions/robust/arithmetic/performance/reduceAlias
distributions/robust/arithmetic/performance/assignSlice
distributions/robust/arithmetic/performance/alloc
  Changed comm counts: more GETs.


git-svn-id: 5aabc979e906cfa1cd4a03d781c193b99fe6e46f@21345 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

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