handle attachment duplicates on the same shard
handle attachment duplicates on the same shard

prevents it from deleting itself when overwriting

Change-Id: I0cc56640168dcf06d57d289e1f09a307c984a3ef
Reviewed-on: https://gerrit.instructure.com/100327
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <2591e5f46f28d303f9dc027d475a5c60d8dea17a@instructure.com>
Product-Review: Dan Minkevitch <2591e5f46f28d303f9dc027d475a5c60d8dea17a@instructure.com>
QA-Review: James Williams  <3a5f4ed991dbfa5c9ef76ad729d240ca12f62180@instructure.com>

instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,SwinburneOnline/canvas-lms,grahamb/canvas-lms,venturehive/canvas-lms,matematikk-mooc/canvas-lms,instructure/canvas-lms,venturehive/canvas-lms,grahamb/canvas-lms,venturehive/canvas-lms,instructure/canvas-lms,SwinburneOnline/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,grahamb/canvas-lms,SwinburneOnline/canvas-lms,instructure/canvas-lms,djbender/canvas-lms,grahamb/canvas-lms,instructure/canvas-lms,matematikk-mooc/canvas-lms,matematikk-mooc/canvas-lms,sfu/canvas-lms,SwinburneOnline/canvas-lms,instructure/canvas-lms,grahamb/canvas-lms,matematikk-mooc/canvas-lms,sfu/canvas-lms,venturehive/canvas-lms,sfu/canvas-lms