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.
Merge pull request #1 from amatiasq/patch-1

Optimized extend()