Add API for duplicating a collection (bug 906186)