Implement clone with initCapacity and appendSliceAssumeCapacity

`ArrayList.ensureTotalCapacityPrecise` uses `Allocator.reallocAtLeast` under
the hood, which can return more than `new_capacity` bytes if `alignment
!= @alignOf(T)`. This implementation of `clone` assures that
the case of `ensureTotalCapacityPrecise` is handled correctly.

Thanks @Vexu and @squeek502 for pointing this out.
f04007028fJohn Schmidt committed on 1/27/2022, 5:35:08 PM· committed by Veikka Tuominenparentd86b866
1 file changedLine totals unavailable