Generalize small_exclusive_scan
Add missing wait() at the end of scatter.
Silence warnings in tail_flags.hpp
Add head_flags type
Add competent reduce_by_key implementation