Unitary Transformations on Temporal Modes using Dispersive Optics for Boson Sampling and Quantum Simulation