Refactor classes to inherit from nn.Module instead of nn.Sequential
# What does this PR do?

Refactors classes that inherit from `nn.Sequential` to inherit from `nn.Module` instead. This is to make the code easier to debug and inspect.

Changes: 
* Explicit `forward` method implemented for classes
* Iterating over layers and them registering to the module using `add_module(str_ind, layer)` in `__init__`. This provides backwards compatibility as the submodules will be named according to their position in the call stack, like in nn.Sequential, which is needed to load in the same checkpoints.  

Note: This does not include other possible `nn.Sequential` refactoring within modules e.g. [lxmert](https://github.com/huggingface/transformers/blob/6ee1474b67b088829555364a14ebfb45e661fac4/src/transformers/models/lxmert/modeling_lxmert.py#L721), or inheriting from `ModuleList` e.g. in [Beit](https://github.com/huggingface/transformers/blob/2ef09ecfb8afb6624aab87afdad9fe72030397af/src/transformers/models/beit/modeling_beit.py#L962). These are more involved changes and should be address in separate PRs.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?

## Who can review?

Anyone in the community is free to review the PR once the tests have passed. 

_The documentation is not available anymore as the PR was closed or merged._