Avoid importing from pandas at _libs files
- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Something that brought at to me at first [here](https://github.com/pandas-dev/pandas/pull/30395#discussion_r363101229)

---

cc @jbrockmendel 
What is the benefit of doing this? I think I prefer it as is so we have only one way of testing for 32 bit @WillAyd TBH I don't really know, all I do know is that one time I imported ```pandas.compat``` at the top, and I was requested to change it. @MomIsBestFriend is right that in general we try to avoid non-_libs imports in _libs, but that rule is not hard-and-fast, e.g. _libs.parsers is all over the place.  tslibs is the only place where im really adamant about this. Unless there is a performance improvement I'd be -1 on this change what actually need is a *cython* version of compat that we can use; this is not what we are going for.