Optimize task counter in _EndCount class

[reviewed by Greg]

This patch adds a config param to specify the type of the task counter
(taskCnt) in the _EndCount type.  By default, if
CHPL_NETWORK_ATOMICS==none, taskCnt will be a regular integer,
otherwise we will use an atomic to take advantage of network atomic
support.  I also changed the logic in _upEndCount() to use an on
statement when *not* using network atomics, because we will already be
going to the remote locale to update the atomic field, 'i'.  This
saves us a remote put and get.

Note that we may eventually want to be able to set the type on a per
use basis, because using network atomics in cases where all the
counted tasks are local may degrade performance depending on the
overhead of creating a task as well the task bodies themselves.

This resolves the performance future for
test/parallel/taskPar/sungeun/taskCount.chpl and reduces the put and
get counts in test/performance/sungeun/multilocale/syncsingle.chpl.

I also added compopts to the taskCount test to test both paths of code
for different taskCnt types.  Finally, I added a compopts for the
endCountTest in that same directory to always test without the atomic,
so that the output will be the same for different comm layers.



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