Remove undefined `trainer` in `get_lm_model_with_padded_embedding`
# What does this PR do ?

Fixes errors using `BertDPRModel` and `BertJointIRModel`. Currently you get an exception due to an undefined variable `trainer` from method `get_lm_model_with_padded_embedding` in `BaseIRModel`.

**Collection**: nlp

# Changelog 
- Fixes errors using `BertDPRModel` and `BertJointIRModel` from undefined trainer name.

# Usage
* You can potentially add a usage example below

```python
from omegaconf import OmegaConf
from nemo.collections.nlp.models.information_retrieval import  BertJointIRModel

model_name_or_path = "intfloat/e5-small-v2"

cfg = OmegaConf.create({
    "language_model": {"sim_score_dropout": 0.1, "pretrained_model_name": model_name_or_path, "config_file": None, "config": None}, 
    "tokenizer": {"tokenizer_name": model_name_or_path, "vocab_file": None, "special_tokens": None, "tokenizer_model": None}
})
BertJointIRModel(cfg)
# => Raises NameError: name 'trainer' is not defined
```

# Before your PR is "Ready for review"
**Pre checks**:
- [ ] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [ ] Did you write any new necessary tests?
- [ ] Did you add or update any necessary documentation?
- [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [ ] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [ ] New Feature
- [x] Bugfix
- [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.


## Who can review?

Anyone in the community is free to review the PR once the checks have passed. 
[Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md) contains specific people who can review PRs to various areas.

# Additional Information
* Related to # (issue)
