GcLock: write lock

This patch introduces a new type of lock in GcLock: writelock.

With that comes a new interface :

   * enterWriteShared : mark the beginning of a write-side critical section ;
   * lockWrite : block all writes and waits for all ongoing writes to finish ;
   * writeBarrier : wait for all ongoing writes to finish