Re-implemented tokenize() iteratively in PreTrainedTokenizer.
Author: samvelyan
Pull request: yes

Firstly, Thanks a lot for this amazing library. Great work!

### Motivation

The `tokenize()` function in `PreTrainedTokenizer` uses the nested `split_on_tokens` recursive function which is called for all the added tokens (& special tokens). However, if the number of added tokens is large (e.g. > 1000), which is often the case with domain-specific texts, a `RuntimeError` is thrown due to reaching the maximum recursion depth.

### Changes

To address the issue, I re-implemented the `tokenize()` method in `PreTrainedTokenizer` iteratively. 

My solution works faster than the original recursive code which features a large number of list copying because of slicing on line 482:

```python
   return sum((split_on_tokens(tok_list[1:], sub_text.strip()) + [tok] \
                        for sub_text in split_text), [])[:-1]
``` 

### Results

I carefully tested the new function against the original recursive one. They produce exactly the same tokenization on all of my experiments.

Comments:
The failed test log reads:
``` 
ERROR    pytorch_transformers.modeling_utils:modeling_utils.py:160 Couldn't reach server at 'https://s3.amazonaws.com/models.huggingface.co/bert/bert-large-uncased-whole-word-masking-config.json' to download pretrained model configuration file.
```

This shouldn't be from my end.

# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1027?src=pr&el=h1) Report
> Merging [#1027](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1027?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/9beaa85b071078f84037f6a036ea042f551a8623?src=pr&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `96%`.

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

```diff
@@            Coverage Diff             @@
##           master    #1027      +/-   ##
==========================================
+ Coverage    79.6%   79.62%   +0.02%     
==========================================
  Files          42       42              
  Lines        6864     6886      +22     
==========================================
+ Hits         5464     5483      +19     
- Misses       1400     1403       +3
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1027?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/tokenization\_utils.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1027/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX3V0aWxzLnB5) | `86.13% <96%> (+0.01%)` | :arrow_up: |

------

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


That's nice, thanks a lot Mikayel!