This moves a bunch of helper functions from Transforms/SparseTensorConversion.cpp into Transforms/CodegenUtils.{cpp,h} so that they can be reused by Transforms/Sparsification.cpp, etc.
See also the dependent D115010 which cleans up some corner cases in this change.
It isn't clear to me that we should be exposing this kind of API in the external API, can this just be local to the lib/ directory?