container types: do not write lock when calling addContentType()
This should be done from outside. Rationale: In many cases (see e.g.
kdev-python expression visitor) the type is instantiated, a lot of
content types are added, and only then is it attached to a declaration.
In this case, no write locking is necessary, and it prevents the calling
code to hold a more coarse-scale read lock.
This requires changes to the code using the API only if the modified type
is already accessible through a declaration. I changed kdev-python
and checked kdev-ruby (it has no cases where this applies and no read-lock
is held at that time); kdev-php doesn't use this class.