CLN: Add _reset_cache method to PandasObject

I think this is the right way to do it. MI needs this for _engine and
friends. I think there are other objects that use `cache_readonly` that
might want to reset too.

I also moved the local dir methods off of StringMixin to PandasObject
(where they ought to have been).

Fixes #5236 and fixes #5225.