Fix/direct mongodb writer

| Q                    | A
| -------------------- | ---
| Bug fix?             | Yes
| New feature?         | No
| BC breaks?           | Yes
| CI currently passes? | Yes
| Tests pass?          | Yes
| Scenarios pass?      | Yes
| Checkstyle issues?*  | No
| PMD issues?**        | No
| Changelog updated?   | Yes
| Fixed tickets        |
| Doc PR               |

Fixes heavy memory consumption for the direct mongo import, where cached were not flushed
As it's a BC, I would have added as well what was broken (here, the constructor signature of the product writer)