[Tests] Improve test_attention_outputs
# What does this PR do?

I noticed several vision models overwrite `test_attention_outputs`, but we have a `has_attentions` flag exactly for this purpose.

Hence, I've adapted the test in `test_modeling_common.py` and `test_modeling_tf_common.p`y to improve this.
_The documentation is not available anymore as the PR was closed or merged._