Add sync array method

Creating an array of managed objects is really slow because for each object you have to do a lookup in the database to check if the object already exists. I added a new method to synchronize an array with the managed object context that is a lot faster and also deletes obsolete objects.