[ATR-24689] Change the trigger menu metadata merging strategy
Change the trigger menu metadata merging strategy to double-merge (both input file -> internal store, and internal store -> output file)
This is to resolve an issue in MP AOD->DAOD processing in release 22 where some JSON were missing from the output file due to the lack of this second merging pass.
A global mutex is put in just for safety.