Finite-dimensional description of nonlinear pulse propagation in optical-fiber couplers with applications to soliton switching