repository: Introduce "eager" optimization strategy
Introduce an "eager" optimization strategy that complements the "heuristical" strategy. In contrast to the latter one, the "eager" strategy will optimize all data structures of the Git repository regardless of whether they already are in an optimal state or not.
Closes #4543 (closed).