This method will attempt to de-serialize given bytes using the regular
serde_ipld_dagcbor::from_slice. Due to a historical issue in Lotus (see more in
FIP-0027, we must still
support strings with invalid UTF-8 bytes. On a failure, it
will retry the operation using the fallback that will de-serialize
strings with invalid UTF-8 bytes as bytes.
Limit the the number of bytes that are used for pre-allocating Vec<Cid>s. This follows what serde is
doing internally with serde::private::size_hint::cautious().
The limit is set to 1 MiB, which is a reasonable upper bound for most use cases.