Fixing TransformerXL bool issue #1169
Author: thomwolf
Pull request: yes

Fixing #1169 regarding using uint or bool masks in Transformer-XL and PyTorch 1.1.0 and 1.2.0.

Hopefully, this solution will be compatible upward with the future PyTorch releases.

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

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

```diff
@@            Coverage Diff             @@
##           master    #1199      +/-   ##
==========================================
- Coverage   80.83%   80.81%   -0.02%     
==========================================
  Files          46       46              
  Lines        7878     7881       +3     
==========================================
+ Hits         6368     6369       +1     
- Misses       1510     1512       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1199?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_transfo\_xl.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1199/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdHJhbnNmb194bC5weQ==) | `56.9% <33.33%> (-0.1%)` | :arrow_down: |

------

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


# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1199?src=pr&el=h1) Report
> Merging [#1199](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1199?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/0b52642d379bed155e8aa4f4088588bfd8ceaa88?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `42.85%`.

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

```diff
@@            Coverage Diff             @@
##           master    #1199      +/-   ##
==========================================
- Coverage   80.83%   80.81%   -0.02%     
==========================================
  Files          46       46              
  Lines        7878     7881       +3     
==========================================
+ Hits         6368     6369       +1     
- Misses       1510     1512       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1199?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_transfo\_xl.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1199/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfdHJhbnNmb194bC5weQ==) | `56.9% <42.85%> (-0.1%)` | :arrow_down: |

------

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


Looks great to me!