NXCM-4979: Tasks dissapearing

This pull does not fix the issue, as it was not reproduced. Here are only fixes found during code reading:

* task config manager was leaving configuration "dirty" in some cases
* added a "diagnostic log" that can be enabled on certain systems, that should provide us more information about the main issue. Enabling is possible without putting Nexus into DEBUG mode, to end up with logs filling disk.
* reformat