Store the length as u32 internally. This is to shrink the size of the
ArrayVec value (when possible, depending on element type).
Inline storage vectors larger than u32::MAX are very unlikely to be
useful - for these cases, prefer using Vec instead.
It's not possible to have the CAP type parameter be of type u32 (missing
features in const evaluation/const generics). We also have to panic at
runtime instead of having a static assertion for capacity, for similar
reasons.
Prefer ManuallyDrop instead of forget (more modern style preference -
with the benefit that the ManuallyDrop style sets up the non-dropping
before taking further actions).
This regresses performance of the .extend(s) benchmark where s is a
slice; to compensate add a private extend_from_slice method that we can
use where possible (clone_from, try_from).