FIX integer types in Ward clustering

Use `np.npy_intp`, aka `np.intp` in Python, for all indices. Also added `mode='c'` declarations where NumPy would permit and made some small improvements to the docs and code style.

I hope this fixes #2322; @vene, please check.