Photonic time-stretch: applications to ultrafast spectroscopy and real-time imaging