Improve generated addXXX method performance
Improve generated addXXX method performance

The current implementation of the generated addXXX method will iterate
over the contained array where each iteration will test for object_id
equality. Once the iteration is done and such an entry is found it
checks it the added value is an instance of MMBase or MMGeneric. If it
is, then it's considered a duplicate and the method returns.

This commit changes the implementation so that the test for MMBase/
MMGeneric is made prior to the iteration, thus avoiding the iteration
alltogether for all non model objects.

mthiede/rgen,kwangkim/rgen