Step 4 of getting GlobalDeviceMemory to own its handle.
Take out code to pack untyped device memory types as kernel arguments.
When GlobalDeviceMemory owns its handle, users will never touch untyped
device memory types, so they will never pass them as kernel args.
As a separate patch, I wonder if these classes should have a getByteCount() so you don't have to do this error-prone calculation.