Local on statement optimization.
Local on statement optimization.

When the on clause localeID evaluates to here.id, there's no need to
bundle args and call chpl_comm_fork().  Instead we can directly call
the on_fn.

Background: Single locale RA using gasnet was ~30x slower than comm
none due primarily to the malloc calls for bundling the args for the
fork call, the actual call to chpl_comm_fork(), and the function table
look up.  In general for RA, this optimization will help in 1/nl of
the cases for nl>1.

There are also a lot of places in the modules where we use an on
clause (e.g., reference counting, any access to sync vars).  This
optimization helps tremendously in the case where we're already on the
right locale and also for nested on clauses (e.g., in the case of
tearing down coforalls).

[Reviewed by BLC]



git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@19449 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

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