Bugfix in SimilarityIndexer

The SimilarityIndexer assigned training items to the wrong indexing file. E.g. a photo in cluster x might be indexed in cluster y. When the training file is sorted more or less by locality, this likely did not propagate a lot, but in cases where the adjacent training lines relate to completely different locations in the world, the similarity step provided incorrect results, likely worse than taking the cluster medoid.

Signed-off-by: Olivier Van Laere <oliviervanlaere@gmail.com>