virInsertElementsN: Split out actual insertion code
virInsertElementsN: Split out actual insertion code

Split out the code doing the movement of the elements and insertion from
the range checks. This will help in adding an error-free version for
appension.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

olafhering/libvirt,zippy2/libvirt,jfehlig/libvirt,jfehlig/libvirt,libvirt/libvirt,crobinso/libvirt,olafhering/libvirt,crobinso/libvirt,libvirt/libvirt,zippy2/libvirt,nertpinx/libvirt,crobinso/libvirt,jfehlig/libvirt,olafhering/libvirt,zippy2/libvirt,crobinso/libvirt,nertpinx/libvirt,nertpinx/libvirt,libvirt/libvirt,nertpinx/libvirt,jfehlig/libvirt,nertpinx/libvirt,olafhering/libvirt,libvirt/libvirt,zippy2/libvirt