Revert "Revert "Merge pull request #840 from dimagi/mm-bulk-task""

This reverts commit 6ef1fe1b62ba31ed19d8e3053a486ca68b66816b.
wasn't updating checked_paths in the right place after move to cache model
make sure media has id assigned before adding attachment
Merge pull request #884 from dimagi/multimedia-bulk-fix

Multimedia bulk fix