This change refactors gRPC code used within the v3 API package into generic code that can be used for managing gRPC and gRPC Gateway.