Ordered batch imports

The batch import does not use the 'position' attribute of incoming component records to correctly set the order of siblings in the component tree. This PR addresses that. It should probably be reviewed by someone else.