Added unit tests trying to mimic potential deadlocks
Small improvement in DataContractSerializerFactory