Dipole formation and yielding in a two-dimensional continuum dislocation model