[tokenizers] Fix #5081 and improve backward compatibility
Author: thomwolf
Pull request: yes

Adds a generic fallback for `get_special_tokens_mask()` when there is only one input sentence and `already_has_special_tokens=True`.

It's still recommended to use `return_special_mask=True` in any encoding method for efficiency but this should work as well the above indicated cases.

Removed one test related to `get_special_tokens_mask()` which didn't test its operation in a reliable manner across tokenizers.

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

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

```diff
@@            Coverage Diff             @@
##           master    #5125      +/-   ##
==========================================
- Coverage   78.04%   77.99%   -0.05%     
==========================================
  Files         138      138              
  Lines       23766    23772       +6     
==========================================
- Hits        18548    18541       -7     
- Misses       5218     5231      +13     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5125?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5125/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHMucHk=) | `94.81% <ø> (ø)` | |
| [src/transformers/tokenization\_utils\_base.py](https://codecov.io/gh/huggingface/transformers/pull/5125/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `91.07% <33.33%> (-0.63%)` | :arrow_down: |
| [src/transformers/data/processors/squad.py](https://codecov.io/gh/huggingface/transformers/pull/5125/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL3Byb2Nlc3NvcnMvc3F1YWQucHk=) | `28.66% <0.00%> (-5.42%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5125/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `85.81% <0.00%> (-0.15%)` | :arrow_down: |
| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/5125/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `39.57% <0.00%> (+1.18%)` | :arrow_up: |
| [src/transformers/modeling\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5125/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `80.90% <0.00%> (+1.38%)` | :arrow_up: |

------

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