mongodb: WIP bulk insert

WIP: flush is done, but needs to be done at deinit time too. it also
seems to get stuck. send help. BEEP BEEP.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>