Forward port HCAL fix of pre-mixing

This is forward port of HCAL pre-mixing fix 7_0_X (PR 4325) -> 7_1_X (PR 4379) -> 7_2_X .

This cannot be done automatically, because in 7_2_X boost::shared_ptr is substituted by std::shared_ptr.