[Encoder-Decoder] Force models outputs to always have batch_size as their first dim
Author: patrickvonplaten
Pull request: yes

This PR remove the hard-coded variable `encoder_outputs_batch_dim_idx` from Bart and T5 by transposing BART's `encoder_outputs` dimensions before returning them.

**Reasons:**
- When adding more encoder-decoder models, we would always force the newly added model to have this variable
- When adding the modeling_encoder_decoder.py file, models that could be used in an encoder-decoder structure would also need to have this attribute, e.g. we would have to add it to Bert for example
- `encoder_outputs_batch_dim_idx` is a hard-coded variable that I don't think is very pretty

**Trade-off:**
- Now every encoder output in a encoder-decoder model has to have `batch_size` as their first dimension.

This PR is related to a question that already came up before (see #3120): 
*Should we force all model outputs to have `batch_size` as their first dimension* ?

I think it would be good to always have `batch_size` as the first dimension (to the user) exposed output @thomwolf @LysandreJik @sshleifer @julien-c 

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/3536?src=pr&el=h1) Report
> Merging [#3536](https://codecov.io/gh/huggingface/transformers/pull/3536?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/6f5a12a5833d1e3783e4b8a42cb556b64085745e&el=desc) will **decrease** coverage by `0.49%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/3536/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/3536?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #3536      +/-   ##
==========================================
- Coverage   78.30%   77.80%   -0.50%     
==========================================
  Files         100      100              
  Lines       17062    17062              
==========================================
- Hits        13360    13275      -85     
- Misses       3702     3787      +85     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/3536?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/3536/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190NS5weQ==) | `81.48% <ø> (-0.05%)` | :arrow_down: |
| [src/transformers/modeling\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/3536/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `97.59% <100.00%> (+0.01%)` | :arrow_up: |
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/3536/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `91.80% <100.00%> (-0.02%)` | :arrow_down: |
| [src/transformers/data/processors/squad.py](https://codecov.io/gh/huggingface/transformers/pull/3536/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL3Byb2Nlc3NvcnMvc3F1YWQucHk=) | `28.89% <0.00%> (-27.60%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/3536?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/3536?src=pr&el=footer). Last update [6f5a12a...89d0945](https://codecov.io/gh/huggingface/transformers/pull/3536?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).