Adding PrefixConstrainedLogitsProcessor
# What does this PR do?
This pull request adds a new decoding strategy that constrains the next token to generate based on a callable function. It is a new PR that fixes https://github.com/huggingface/transformers/pull/7784 since the generate function went trough refactoring. @patrickvonplaten 
@patrickvonplaten I think we are ready to merge now 😊<|||||>Hey @nicola-decao,

Thanks a lot for re-implementing your PR! A couple of things I think we should improve.

1) I'm still not 100% sure how the API of `prefix_allowed_tokens_fn` would look like. Does it take one or two arguments? Also it would be very useful to correctly define the type hints in this case as I mentioned in the comment above

2) Can we add a test for this logits processor? It should be relatively straight-forward in /home/patrick/hugging_face/transformers/tests/test_generation_logits_process.py. The test should only test the `prefix_allowed_tokens_fn` not the whole generate function. 

3) It would be awesome if the docstring could be a bit more explicit (*e.g.* including your paper and maybe even a tiny example)

4) Can we delete the `src/.DS_Store ` file?

5) (Not required for merge) I think we could speed up this function by just using torch.Tensor operations (see comment above), but I'm happy to keep this for a future PR.

Also, let me know if you need help! :-) <|||||>> Great looks good to me now! @yjernite - do you want to take a final look as well?

Yup! Will take a look by EOD<|||||>LGTM, thanks for implementing this functionality!<|||||>Great work @nicola-decao <|||||>> Great work @nicola-decao

Thanks :)