Read hdf returns unexpected values for categorical
- [V] closes #39189
- [V] tests added / passed
- [V] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [V] whatsnew entry

This bug happens when filtering on categorical string columns and choose a value which doesn't exist in the column. Instead of returning an empty dataframe, we get some records. It happens because of the usage in numpy `searchsorted(v, side="left")` that find indices where elements should be inserted to maintain order (and not 0 in case that the value doesn't exist), like was assumed in the code.
I changed it to first the for the value, and use `searchsorted` only if value exists, I also added a test for this specific use case. I think in the long run, maybe we should refactor this area in the code since one function covers multiple use cases which makes it more complex to test.

In addition, I moved the logic to a new method to keep the single-responsibility principle and to make it easier to test.
note that you don't need to open a new PR, you can simply push to the original one. since you already did, then ok. I think the failures here are not related to my changes. thanks @nofarm3 