Analysis of image collections based on shared content