Propagation of a quantum fluid of light in a cavityless nonlinear optical medium: General theory and response to quantum quenches