[MRG] Locality Sensitive Hashing for approximate nearest neighbor search

New PR created from #3304
I wonder if you should be hashing all the queries at once, i.e. outside of this function.