graphqlutil: Move some useful helper functions into util package
Created by: efritz
This PR moves some codeintel-defined utility functions into a shared (existing) graphqlutil package. This will help reduce some duplicated code in https://github.com/sourcegraph/sourcegraph/pull/27472 and https://github.com/sourcegraph/sourcegraph/pull/27395.