Fix mongodb reporting module to avoid dupes

When running more than once the mongodb reporting module on the same task id (for example by running utils/process.py), new objects are always added to the "analysis" and "calls" collections instead of replacing/updating the old ones.

This fix should avoid duplicates by checking whether an old analysis object exists with the same task id, and updating it instead of creating a new one. Api calls are just deleted and recreated as checking for dupes is just too hard (and probably needless).