Classical electrodynamics as a nonlinear dynamical system