Fix PreTrainedTokenizer.pad when first inputs are empty
# What does this PR do?

Currently, `PreTrainedTokenizer.pad` errors when the first `input_ids` are empty (because it tries to guess the type of the tokens by looking at the first element). This PR slightly changes the behavior to loop until we find a non empty list.

Fixes #8674 (not the initial issue but the one mentioned at the end)