[14.2] Only activate Git pack-objects hook if cache is enabled
In !3301 (merged), we
dropped the upload_pack_gitaly_hooks feature flag because it was
confusing to have to enable this feature flag on top of the pack objects
cache setting in config.toml.
However, we have found that spawning the gitaly-hooks environment can add significant CPU load due to overhead from transferring data over gRPC and spawning gitaly-hooks processes.
We now only enable this hook if the pack objects cache is enabled.
Relates to #3754 (closed)
Edited by Stan Hu