BUG: stats.kendalltau handling of inputs with only ties.

That it returned only 1 instead of 2 values is a plain bug, returning nan is a
choice (see discussion on #1658).

Closes #1658 and #1690.