BUG: avoid NaNs throwing off class probabilities

In the case where neigh_dist includes at least one zero and self.weights is 'distance',
some values of `weights` may be infinite.
This is ok, except for when normalizing `proba_k`, when it creates NaN values.
fixing warning ignore type
adding test case
conform to pep8
apply the fix closer to the source of the issue
Merge pull request #2941 from perimosocordiae/patch-1

BUG: avoid NaNs throwing off class probabilities