[WIP] Thread safeness for ws_object type

work in progress. The actual type implementation is not thread safe
by now.
The rwlock must be deinitialized before freeing the memory.