Speed up TF token classification postprocessing by converting complete tensors to numpy
# What does this PR do?

The postprocessing of the token classification when using TensorFlow is not as fast as it could be. We discovered that with some experiments and profiling that showed that, in some settings, most time of the pipeline is spent in `gather_pre_entities`:

Before:
<img width="500" alt="before" src="https://user-images.githubusercontent.com/37573274/198983453-8a34e7a8-6f67-4010-9509-359b4fb9bdf7.png">

After:
<img width="500" alt="after" src="https://user-images.githubusercontent.com/37573274/198983760-1f27b4b3-6d55-4137-a22c-707992a11637.png">

This PR speeds it up by converting `input_ids` and `offset_mapping` to numpy before passing them to `gather_pre_entities`. Thereby, the tensor is moved to the appropriate device only once. Besides, it's also in line with the type annotation of `gather_pre_entities`.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case: **n/a**
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation): **n/a**
- [ ] Did you write any new necessary tests? **n/a**


## Who can review?

Could you please review, @LysandreJik 😊

_The documentation is not available anymore as the PR was closed or merged._<|||||>cc @Rocketknight1 <|||||>This looks like a great improvement, thank you! I didn't realize how inefficient the postprocessing was there.

The PR is failing style checks, but I can fix that here, and will merge once that's done. Thank you!<|||||>Update: I believe the failing checks are caused by issues unrelated to this PR - you just happened to fork at a bad time. I'll merge and watch tests to make sure nothing goes too terribly wrong. Thanks again!<|||||>Great! Thanks for the quick review and merge 😊 