Optimize synthetic deleted generated when replicating from storage

Do not generate child record delete when parent is deleted in the same transaction.
Proper solution
Merge pull request #142 from wajam/manue-optimize-synthetic-delete

Optimize synthetic deleted generated when replicating from storage