Introduce scan_buffer type
Collapse inclusive & exclusive scan implementations.