Register the extension device module as a native module under torch namespace (#78329)
## Motivation
Enhance the _register_device_module to register the extension device module as a native module under torch namespace. The user can use the extension device module as a native module in torch namespace.
e.g:
```
import torch.xpu as gpu
from torch.xpu import Event
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78329
Approved by: https://github.com/albanD