Don't destroy traces while they are being imported
If a trace was deleted while it was being imported, TraceDestroyerJob
could remove it and its points while TraceImporterJob was still adding
points, so the import failed the foreign key check and the owner was
emailed the full backtrace. If it happened after the last batch of
points, the import went on to attach the image and icon to the deleted
trace, and they were never removed.
TraceImporterJob now holds a key share lock on the trace while
importing it, and TraceDestroyerJob locks the trace before deleting
anything, so it waits for any import to finish. A key share lock
doesn't block other updates to the trace, so it can still be edited,
or marked as deleted, during the import.