Build nested set for repositories, refs #4280

Modify rgt and lft values for the existing repositories
after adding a root repository in the migration