OPT/BioGPT: Improved attention mask shape exception
# What does this PR do?

Related exception: #23197

Currently, in OPT/BioGPT, if we don't pass an attention mask or if we pass an attention mask with a wrong shape, an exception will be printed in the attention layer: `Attention mask should be of size {(bsz, 1, tgt_len, src_len)}, but is {attention_mask.size()}`. This exception has the following problems:
1. It checks the expanded attention mask, not the attention mask as set by the user (or the default). Even as a maintainer, I can't immediately decode the error message, as I would need to know how the mask is expanded for the model in question.
2. If there is a bug computing `bsz`, `tgt_len`, or `src_len`, the exception will be misleading.

In #23197 we found that when the length of `past_key_values` is equal to the length of the `attention_mask`, `tgt_len` and `src_len` will be wrong (in at least these 2 models), triggering the exception with an incorrect message. This PR solves both issues: it prevents the incorrect computation of `tgt_len` and `src_len` by checking the shape of `attention_mask` in the main model class, printing a user-friendly message.

If this PR gets approved, I will add a similar check to the other models.
_The documentation is not available anymore as the PR was closed or merged._