teach knn to handle non-matrix inputs
perform self-query when data is not supplied

* this is what RANN:nn2 does
* including test