Fix image segmentation tool bug
# What does this PR do?

Currently tools using the ImageSegmentation tool fail because the parameters for the image processor are overridden with the input image dimensions. This results in incompatible input dimensions being passed to the model.

This PR removes this logic in the `encode` method and removes the resizing in the tests which only happened for the segmentation tool and hid the issue. 

Fixes #23328 


## 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.
- [ ] 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).
- [x] Did you write any new necessary tests?

@sgugger @LysandreJik The fix is pretty simple, but in the spirit of Chesterton's fence, I wasn't sure/couldn't remember the reason for the `self.pre_processor.image_processor.size = ...` logic so wanted to ask you both in case this is breaking assumptions elsewhere. <|||||>_The documentation is not available anymore as the PR was closed or merged._<|||||>This seems reasonable! I had run into issues where I couldn't segment images with different sizes when implementing it.

I have tried with different flavors of the following 

![image](https://github.com/huggingface/transformers/assets/30755778/0e895dc8-c4ce-41fe-a864-4d298571d4ac)

and it seems to work well even without specifying the size.

Your change looks good to me @amyeroberts; are you aware of sizes that may not work with this model?<|||||>@LysandreJik It *should* all be OK if the image processor matches the model: there shouldn't be any sizes that don't work because the image processor will resize as needed. 

In terms of sizes that won't work:
* We can't input images with either height or width smaller that the model's patch size - 16 by default
* Images which (image_height // patch_size) * (image_width // patch_size) > max_sequence_length
* Non-square images where `(image_height // patch_size) != (image_width // patch_size)`. Just looking high-level at the model, I think it could be reworked to accept non-square images but haven't dug into it deeply. 