[GO] Generate imports for UnmarshalJSON func only when it's present
Fixes #20599
As reported in the mentioned issue, openapi-generator currently generates unused imports when the UmarshalJSON func is not generated and the Go compiler will refuse to accept a program with unused imports. This PR fixes that by tying the addition of imports for bytes and fmt to the enablement of the generateUnmashalJSON flag.
Validation
When generating a Go client with this modification applied for the src/test/resources/3_0/petstore.yaml sample with the UnmarshalJSON flag disabled (-p 'generateUnmarshalJSON=false'), for example, the imports for bytes and fmt should not be present on top of generated file model_pet.go. The Go compiler should also compile the generated client without complaining. This does not happen with current main/master.
Mentioning the Go technical committee as per PR instructions: @antihax @grokify @kemokemo @jirikuncar @ph4r5h4d @lwj5