Optimal Control of Transient Flows in Pipeline Networks with Heterogeneous Mixtures of Hydrogen and Natural Gas