Fixed an off-by-one in Thread.Pop.
Added Thread.PopValue().