[bart] add config.extra_pos_embeddings to facilitate reuse
Author: sshleifer
Pull request: yes

Previously bart's LearnedPositionalEmbedding basically assumed pad_token_id>=1, and added 2 extra spaces of empty embeddings at the beginning. These positions were never used.

Since the blenderbot state dict has only 128 entries (exactly as many as it needs, whereas bart has 1026, 2 more than it needs). it cannot use `LearnedPositionalEmbedding` unless we either allow this offset to bet set to 0, or add empty indices. 

I prefer the former since the offset's motivation is not super clear to me.

I also move `create_position_ids_from_input_ids` into modeling_roberta.py, the only place it is used.




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

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

```diff
@@            Coverage Diff             @@
##           master    #5190      +/-   ##
==========================================
- Coverage   77.96%   77.09%   -0.88%     
==========================================
  Files         138      138              
  Lines       23838    23839       +1     
==========================================
- Hits        18585    18378     -207     
- Misses       5253     5461     +208     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5190?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5190/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `91.14% <ø> (-0.05%)` | :arrow_down: |
| [src/transformers/configuration\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/5190/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JhcnQucHk=) | `93.75% <100.00%> (+0.13%)` | :arrow_up: |
| [src/transformers/modeling\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/5190/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `96.24% <100.00%> (+<0.01%)` | :arrow_up: |
| [src/transformers/modeling\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/5190/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `94.85% <100.00%> (+0.07%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5190/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `19.92% <0.00%> (-75.00%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5190/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `85.71% <0.00%> (-0.30%)` | :arrow_down: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5190/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `76.80% <0.00%> (+0.38%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/5190?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/5190?src=pr&el=footer). Last update [b28b537...00d97e5](https://codecov.io/gh/huggingface/transformers/pull/5190?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).