only call isDirty on persistent collection. fix #416
Merge pull request #421 from doctrine/ensure-persistent-collection

only call isDirty on persistent collection