Limit sets, zero dynamics and internal models in the problem of nonlinear output regulation