`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`.
{
        AggregateFunction,
        AggregateFunctionCombinator,
        Database,
        DataType,
        Dictionary,
        Format,
        Function,
        Storage,
        TableFunction
    };
    const QueryFactoriesInfo & getQueryFactoriesInfo() const { return query_factories_info; }
    void addQueryFactoriesInfo(QueryLogFactories factory_type, const String & created_object) const;
    StoragePtr executeTableFunction(const ASTPtr & table_expression);
    void addViewSource(const StoragePtr & storage);
    StoragePtr getViewSource() const;
    String getCurrentDatabase() const;
    String getCurrentQueryId() const { return client_info.current_query_id; }
    
    String getInitialQueryId() const;
    void setCurrentDatabase(const String & name);
    
    
    void setCurrentDatabaseNameInGlobalContext(const String & name);
    void setCurrentQueryId(const String & query_id);
    void killCurrentQuery();
    void setInsertionTable(StorageID db_and_table) { insertion_table = std::move(db_and_table); }