ENH: mask support for hastable functions for indexing
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This is a first step towards creating a MaskedEngine to optimise performance in these cases. This supports masks in the HashTable.
Did not impact performance of non masked cases.

cc @jorisvandenbossche 

As a precursor to a MaskedEngine we have to adjust the HashTable methods to support masked na values. They keep track of seen na values separately. I think this makes more sense than keeping track of the NAs on the Engine level

``map_locations`` and ``lookup`` are normally called when the values are unique or used to check if the values are unique. Nevertheless, if they have duplicate values, they always return the index of the last occurrence of a specific value. This is the same in ``get_item`` and ``set_item``. We have to adjust the length of the HashTable, because the length is used to check if the values were unique. 

Yes this is ready. Would add the actual Engine as a follow up Thanks @phofl (can add follow up PRs if needed)