Pre-allocate vectors in SSZ decoding (#3417)
Pre-allocate vectors in SSZ decoding (#3417)

## Issue Addressed

Fixes a potential regression in memory fragmentation identified by @paulhauner here: https://github.com/sigp/lighthouse/pull/3371#discussion_r931770045.

## Proposed Changes

Immediately allocate a vector with sufficient size to hold all decoded elements in SSZ decoding. The `size_hint` is derived from the range iterator here:

https://github.com/sigp/lighthouse/blob/2983235650811437b44199f9c94e517e948a1e9b/consensus/ssz/src/decode/impls.rs#L489

## Additional Info

I'd like to test this out on some infra for a substantial duration to see if it affects total fragmentation.




sigp/lighthouse,sigp/lighthouse,sigp/lighthouse,sigp/lighthouse