Replace MVar with spinlock

This improves performance on the distribution benchmark with a bit
over 10x when using 6 CPU cores.