implement is_offsetlike
This is a subset of #18817 that just implements `is_offsetlike` in `dtypes.common` (plus a nicer docstring).  This needs to be implemented before some fixes can be made in indexes.datetimelike, so is worth separating from the more difficult bits of 18817.

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
