TYP: Subset of "Improved the type stubs in the _libs directory to help with type checking"
The two big parts missing from #43744 are interval.pyi and offsets.pyi as they result in many mypy errors.

I had already made changes to somewhat accommodate for interval.pyi and offsets.pyi (if these files are included, we have now "only" ~100 mypy errors). I kept these changes in this PR.