Adding LM Head to Transfo-XL and first step to fixing problem with Adaptive Embeddings in TransfoXL
Author: patrickvonplaten
Pull request: yes

This PR adds LM generation capabilitiies to the TF transfo-xl model. The integration tests for language generation pass, so generation from a pretrained model works now in TF as well. 

What does definitely not work yet is running the both PT and TF models with `self.sample_softmax > 0`: 
- Transfo-XL uses adaptive word embeddings -> the word embeddings ale broken down into 4 Embeddings of different shapes: `[20000, 1024], [20000, 1024], [160000, 64]` and `[67735, 16]` . When `self.sample_softmax > 0` though, it seems like the model expects the `normal` word embeddings with just a single weight matrix. When trying to tie the weights then as done in line 831 (see comment below), the logic breaks. 

This problem seems to be more complex though and I'd suggest to solve it in another PR (add possible have a call before to make things clear). 

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/3286?src=pr&el=h1) Report
> Merging [#3286](https://codecov.io/gh/huggingface/transformers/pull/3286?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/68ef0a111f8740f06ca4e5a00374ec4e2adb0a6d&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `68.29%`.

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

```diff
@@            Coverage Diff             @@
##           master    #3286      +/-   ##
==========================================
+ Coverage   77.48%   77.50%   +0.01%     
==========================================
  Files          99       99              
  Lines       16799    16768      -31     
==========================================
- Hits        13017    12996      -21     
+ Misses       3782     3772      -10     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/3286?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/\_\_init\_\_.py](https://codecov.io/gh/huggingface/transformers/pull/3286/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `98.91% <ø> (ø)` | |
| [src/transformers/modeling\_transfo\_xl\_utilities.py](https://codecov.io/gh/huggingface/transformers/pull/3286/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190cmFuc2ZvX3hsX3V0aWxpdGllcy5weQ==) | `64.61% <ø> (+11.28%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/3286/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl90cmFuc2ZvX3hsLnB5) | `89.15% <55.00%> (-2.04%)` | :arrow_down: |
| [src/transformers/modeling\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/3286/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190cmFuc2ZvX3hsLnB5) | `77.00% <80.95%> (+1.37%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/3286/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `82.46% <0.00%> (-3.76%)` | :arrow_down: |

------

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


> Ok good job.
> 
> I feel like we could remove all the dead code related to sampling softmax (see my comments)

Sound good, will do that then!

Dead code is now removed. This removed a lot of code. To not re-invent the wheel the code is kept in the branch `add_sampling_and_training_to_transfo_xl_models` and documented by the feature request: #3310 , if someone wants to pick up implementing sample softmax again. 

This PR still adds language modeling capabilities to TF transfoXL.