Fix locking in GC.rootIter and GC.rangeIter

The current code locks for the creation of the delegate not the execution.