CLN: Refactor cython to use memory views
Refactored cython files (.pxi.in, .pyx):

1. Made cdef usage consistent (using a cdef block instead of multiple cdef modifier when possible)
2. Replaced type hints with cython type declaration in function signatures
3. Replaced ndarray with memory view in function signatures
4. Added the const modifier to memory views in function signatures

@jreback I took your suggestion in a previous [PR](https://github.com/pandas-dev/pandas/pull/24795#issuecomment-454815511) and implemented on a broader scope.
