Improve Forsetis try-shared-lock.

- There was a case where try-shared would not grab a shared lock if another
  thread had just released the last reference to the lock (thus disposing
  of it). If we come a across a lock like that, we should just retry.