Use AtomicLongArray instead of unsafe

Also use lazySet for unlocking. That change improved the performance of the adjusted benchmark from 12 to 13 million ops/s.