Fixed some bugs in the deadlock detection
Fixed some bugs in the deadlock detection

When determining if a given thread is the last unblocked thread, the main thread was not taken into account.

Also, the time to wake up was assumed to be relative to the current time, when in fact, it needs to be an absolute time.  In addition, the time to wake up was stored in a global variable, so it was not thread safe.

When deadlock is detected, a message is now emitted to this effect.

Finally, a thread is marked as being potentially blocked only if the sync or single variable it is trying to access is actually not available.  I.e., it is marked as being potentially blocked only if it is actually blocked, even if for a small amount of time, whereas before it was marked as potentially blocked without checking to see if the sync or single variable was actually unavailable.

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

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