Make IVF code templated (btag fwk migration)

This PR makes some parts of IVF code templated on the input particles to be used either with tracks or candidates.

This is part of the ongoing btag fwk migration.

delete the commented out line(s) or use LogDebug in this case  if you think is relevant.