Allow copy from a mixed geometry type layer

If the source is a layer that can different geometry type only those
that correspond with the geometry type of the targed are copied

Also a bit of clean up have been performed