[OpenCL] Make global ctor init function a kernel
We need to be able to enqueue internal function that initializes
global constructors on the host side. Therefore it has to be
converted to a kernel.
This change factors out common logic for adding kernel metadata
and moves it from CodeGenFunction to CodeGenModule in order to
make it accessible for the extra use case.
Differential revision: https://reviews.llvm.org/D61488
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360342
91177308-0d34-0410-b5e6-
96231b3b80d8