`DataTypeFactory::get` locks a mutex inside shared a context, there was a case when many threads were locked inside it

https://pastila.nl/?0043b3e6/c557368f4cf0eb87a3c6f2cc162bc693

It is not clear which thread locked the mutex for a long time. However, it may be possible to lock less inside `DataTypeFactory::get`.
UInt16 getTCPPort() const;
    std::optional<UInt16> getTCPPortSecure() const;
    
    void registerServerPort(String port_name, UInt16 port);
    UInt16 getServerPort(const String & port_name) const;
    
    ContextMutablePtr getQueryContext() const;
    bool hasQueryContext() const { return !query_context.expired(); }
    bool isInternalSubquery() const;
    ContextMutablePtr getSessionContext() const;
    bool hasSessionContext() const { return !session_context.expired(); }
    ContextMutablePtr getGlobalContext() const;
    static ContextPtr getGlobalContextInstance() { return global_context_instance; }
    bool hasGlobalContext() const { return !global_context.expired(); }
    bool isGlobalContext() const
    {
        auto ptr = global_context.lock();
        return ptr && ptr.get() == this;
    }
    ContextMutablePtr getBufferContext() const;
    void setQueryContext(ContextMutablePtr context_) { query_context = context_; }
    void setSessionContext(ContextMutablePtr context_) { session_context = context_; }
    void makeQueryContext() { query_context = shared_from_this(); }
    void makeSessionContext() { session_context = shared_from_this(); }
    void makeGlobalContext() { initGlobal(); global_context = shared_from_this(); }
    const Settings & getSettingsRef() const { return settings; }
    void setProgressCallback(ProgressCallback callback);
    
    ProgressCallback getProgressCallback() const;
    void setFileProgressCallback(FileProgressCallback && callback) { file_progress_callback = callback; }