While different, CommonJS and UMD have a lot in common regarding the their exports are constructed. Therefore, there was some code duplication between `CommonJsReflectionHost` and `UmdReflectionHost`. This commit extracts some of the common bits into a separate file as helpers to allow reusing the code in both `ReflectionHost`s. PR Close #34512