BUG: rank with +-inf, #6945
The bug is caused by replacing nan with positive infinite or negative infinite values. As a result, when keep_na is true, both real nan and positive/negative infinite will be assigned nan as the rank. The solution is to keep track of the real nan value when generate the nan mask. 

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