Gradient flow for the one-dimensional Mumford-Shah functional