make certain edge case of viewing mm map much faster

(if you load an app with a bunch of missing mm references don't save it
once for every missing reference)
use iter_docs to get multimedia items out of couch

resulted in a 20 second to 8 second load time for a local build with
about 400 media references
Merge pull request #394 from dimagi/mm-speedup

multimedia map optimizations