Expose the CUDA shared attribute to the C API.

Similar to r209767, which exposed other CUDA-related attributes.

Patch by Rob Springer.