Fix deadlock when forking when immix thread is active

The problem was that it would try to go independent while the lock was
still held. This would deadlock with another thread that wanted to wait
until the immix thread was ready for forking.