Allow nested tensors in predicted logits
# What does this PR do?

Allow deep-nested list or tuple of tensors in the predicted logits of a model. Also excluded the past from those logits if we have a model using past states.

<!-- Remove if not applicable -->

Fixes #7539