Refactor code to insert to mongo

Move code to insert to mongo to
separate file to be able to reuse it
as now we insert in two different
collection, once that has only the load time
and one that has the full har result