Disable rugged auto-detect when Puma threads>1

This is a sub-issue of #35371 (closed).

Rugged does not release GVL during IO operation. As a result, multi-thread Puma + Rugged has poor performance.

During Puma opt-in phase, we expect Puma(theads>1) + Gitaly would give reasonable performance. This aligns to the long term goal to remove rugged totally https://docs.gitlab.com/ee/administration/gitaly/#plans-to-remove-direct-git-access-in-gitlab-rails.

So we should disable rugged auto-detect when puma threads>1.

If user want to use rugged, they have two options:

  1. set Puma thread=1. We assume PumaT1 has same performance as Unicorn, to validate by issue #119321 (closed)
  2. use Feature flag to enable rugged explicitly. This allows user to combine Puma thread>1 with direct Git access (rugged patches).

The auto-detect disable logic happen in use_rugged?, after Feature flag check and before Gitlab::GitalyClient.can_use_disk?. The logic is skipped when Feature flag is explicitly set. So user have choice to explicitly enable/disable use_rugged? by Feature flag(:rugged_commit_is_ancestor, :rugged_tree_entry, :rugged_find_commit, :rugged_list_commits_by_oid, :rugged_commit_tree_entry,:rugged_tree_entries).

Edited by Qingyu Zhao