Move igamma cuda specific code to kernel file. (#47410)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47410
This is a copy-paste except for:
1) The code is put in an anonymous namespace
1) The static declarations on functions (in the now-anonymous namespace) are removed
Test Plan: Imported from OSS
Reviewed By: mruberry
Differential Revision: D24745597
Pulled By: gchanan
fbshipit-source-id: 049b6bb10845cd8d7961b533782f582b3db25248