[MRG] Sparse output KNN

- [x] ~~Implement Cython CSR rowise mode function in sparsefuncs_fast~~
- [x] ~~Implement Cython CSR rowise weighted_mode function in sparsefuncs_fast~~
- [x] ~~Backport scipy sparse advanced indexing~~


This PR originally started out with Cython based improvements, but a middle ground has been chosen for simplicity of implementation.
Can you explain what you are doing here?
Would it be possible to use np.unique with return_inverse?