squash with with_capacity
core: add {option,result}::collect_with_capacity