speed up fmpz_mat_rank by using rref for large sizes