Add support for linking with in-memory PTX code

I’d like to create a PR to allow the @cuda.jit decorator’s link field to accommodate in-memory PTX.

Currently, if a user want to create PTX code dynamically, they need to create a temporary file, and pass the path to the link field of the @cuda.jit decorator. I propose creating a new class (PTXCode) that will store code as a string. Such an object could be added to the link list.

The only other change needed to existing code would be at line 183 of numba/cuda/

        for path in self._linking_files:
            if isinstance(path, PTXCode):
            else :

Does this sound like a good and/or desirable improvement?
It’s also not clear to me where the best place to put the new PTXCode class is. Any guidance on that would be appreciated.