testhelper: Convert `GitalyOrPraefectMessage` to use generics
The helper function GitalyOrPraefectMessage()
will return either one
of two messages depending on whether we execute with Praefect as proxy
or not. It is more generally useful than that though as we may also want
to check other object types. And now that we can use generics it is
needlessly tied to a specific object type.
Convert the function to accept any objects as input by using generics
and rename it to GitalyOrPraefect()
.