Fix a memory leak of SmartMappedCollection

cms.db.smartmappedcollection._event_manager is a global instance of
EventManager that keeps strong references to its handlers, which are
SmartMappedCollections that keep strong references to their parent
objects (i.e. the _parent_obj attribute). This prevents that object from
being garbage collected, and therefore its collection from being
unlinked, and therefore its handler from being removed. We got our
memory leak!

To fix it we just need to use weak references. And make the SMCs fit to
be elements of a set.
Make the RWS logging similar to the CMS one

Apart from the formatter they're now almost identical. This should
ensure consistency in behavior. It would be nice to reduce code
duplication but it may be better to keep them separated.
Set requests dependency to v1.1

Follow up of 0ddfe1308fc86a2d0e6b463f428ac7a33d38aa7f.
Fix logging failure in RWS

The extra["details"] value is supposed to be a string. Passing a
dictionary makes the formatter fails. We need to format it before.
Improve the rest of cmscommon structure.
Use only print function (not statement).