CUDA: Fixes for device functions
CUDA: Fixes for device functions

This fixes issues with device functions:

- `inspect_ptx` was broken by PR #6735 (commit 11a7397). The device
  function should use the code library to obtain the PTX instead of
  attempting to compile directly itself.
- Optimization and debug options were not passed to NVVM when compiling
  device functions. These options are now set up and passed to
  `compile_cuda` when a device function is compiled.

This commit also deprecates the use of `inspect_ptx` - the preferred
API for compiling Python to PTX is to use the `compile_ptx` function
instead. The `inspect_ptx()` method had a couple of issues:

- Allowing it to receive a dict of options for NVVM enabled it to
  produce different PTX to what might actually have been compiled so
  far, as highlighted by the fact that optimization and debug flags
  failed to be passed to NVVM for the `compile()` method, but not in the
  `inspect_ptx()` method.
- The NVVM options dict kwarg was unsafely initialized anyway
  (`nvvm_options={}`) - See issue #5811.
- It returned encoded bytes, which differs from similar APIs (e.g.
  `inspect_llvm()`, and the Dispatcher's `inspect_asm()`, which return
  `str` instead.

As there is no easy way to correctly and consistently pass NVVM options
through `inspect_ptx()`, a warning is emitted stating that these are
ignored if a user passes any options in.

cpcloud/numba,IntelLabs/numba,seibert/numba,seibert/numba,cpcloud/numba,numba/numba,stuartarchibald/numba,stuartarchibald/numba,numba/numba,stuartarchibald/numba,cpcloud/numba,seibert/numba,cpcloud/numba,numba/numba,stonebig/numba,IntelLabs/numba,stonebig/numba,stonebig/numba,stonebig/numba,IntelLabs/numba,IntelLabs/numba,cpcloud/numba,IntelLabs/numba,seibert/numba,seibert/numba,stonebig/numba,numba/numba,stuartarchibald/numba,stuartarchibald/numba,numba/numba