Added self-similarity optimization;
(this halves the number of candidates retrieved from DB)
Fixed image resizing to not distort non-square images
Renamed distance function in ImageUtils
Merge