DEP: Deprecate numpy.rank

This function is commonly confused with numpy.linalg.matrix_rank
and exists itself only for history reasons.

Closes gh-4616