Fixed a bug in which a write could execute unatomically if two writes from remote locales are executed by threads that have the same thread ID.  Made it so the on-statement wraps the code that grabs the lock, instead of the other way around.
Fixed a bug in which a write could execute unatomically if two writes
from remote locales are executed by threads that have the same thread
ID.  Made it so the on-statement wraps the code that grabs the lock,
instead of the other way around.


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

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