Added the SimilarityInstanceDAO and some associated test code.