add function that helps with callback scheduling
fix expanding reduction
fix gathering reduction
fix incorrect handling of multiple pending puts when closing
fix incorrect handling of multiple pending takes when closing
fix incorrect handling of expanding completion when closing
replace remaining direct uses of dispatch.run by schedule