Rehydrating gRPC endpoint implementation

With !7948 (merged), the housekeeping logic of rehydration is implemented.

In this issue, we want to expose this logic by a the optimize_repository gRPC endpoint.

Exposing by a gRPC endpoint means we need to do rehydration manually. This is not ideal. The ultimate goal of rehydration is put it in a gPRC middleware, so that any write request will trigger a rehydration so that we don't need to manually do that.

Edited by Eric Ju
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information