Distinct method bugfix

Creation of instances is executed now only for EmbeddedDocumentField
and GenericEmbeddedDocumentField in distinct method
test implemented
Merge pull request #583 from Gerrrr/distinct_bug

Fixed bug in distinct method