LPS-41789 SF
LPS-41205 LocaleUtil.getDefault shouldn't be used in upgrade because it's not initialized and it won't return the default locale the developer expects. A new method to obtain the defaultLanguageId per company has been created that performs the query in the database to retrieve the current defaultLanguageId per instance.
LPS-41205 Fix other upgrades where we are also using LocaleUtil.getDefault and we should use the new method
LPS-41205 Cache the languageId results in order to prevent network database access (potentially we could have hundreds of thousands of layouts)
LPS-41205 Database agnostic query
LPS-41205 SF