fix memory leaks in MM and sTGC digitization

Merged Nicholas Styles requested to merge nstyles/athena:master-muonLeakFixes into master

Manual sweep of !39665 (merged) from 21.9 - fixing some heap allocations which were resulting in some large leaks when profiled in 21.9.

  • Use Emplace instead of pushing back a new'd pointer which was not cleaned up in MM_Digitization.
  • Use unique_ptrs in sTgcDigitization.

Merge request reports