Integrating Image Clustering and Codebook Learning