Optimized extend()

Until now every iteration created a property.
Repeated properties were written twice.

Now the properties descriptors are stored and written once in a batch.