Change rank.pyx to _rank.py

- Cython was unnecessary in the main rank module
- Don't shadow package name in the module
- Add support for int8 images.
Add support for all data types.

All dtypes larger than 8-bits are converted to uint16 and then bit-shifted to
uint12.
Fix build script
Merge pull request #621 from tonysyu/fix/rank-dtype-compatibility

Fix rank dtype compatibility