correct handling of NA for cume_dist, percent_rank, min_rank and dense_rank. #774