Implement libinternals
A bunch of functions from `lib` that are only used in core.internals, have light dependencies.

Small optimizations: made `slice_getitem` a `cdef` instead of `def`, use PySlice_Check instead of isinstance.
pls just do a move. do a followup to change things. when you move a file its impossible to tell diffs. OK, just changed to be pure cut/paste, will do optimizations in follow-up. shouldn't this be called internals and not libinternals? > shouldn't this be called internals and not libinternals?

The filename is "internals.pyx".  I've gotten used to the convention `import pandas._libs.internals as libinternals` thanks! follow up for docs and small optimizations ok Huh? Was this meant to be closed or merged? it is merged 

see the hash above