improve work queue

Review request. Relates to #4877. Proposing this as a more conservative alternative to Chase-Lev until I figure out how to get array growth and memory reclamation working without a garbage collector.