Update type definitions for nn.Identity (#29135)
Summary:
Updated PR instead of https://github.com/pytorch/pytorch/issues/29114
Running mypy on the following code is throwing an error, Module has no attribute Identity:
```
import torch.nn as nn
layer = nn.Identity()
```
Using the following instead does not give an error:
```
import torch
layer = torch.nn.Identity()
```
CC: ezyang soumith (Sorry for causing the revert previously! Hope this one works fine!)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29135
Differential Revision: D18306331
Pulled By: ezyang
fbshipit-source-id: f10be8a0cccecef423184d009bad8be6d54098a5