[BUG] `BaseFinetuning` not working with `resume_from_checkpoint`
🐛 Bug
Using BaseFinetuning will add parameter groups during training, as a result when trying to load from checkpoint you will get the following ValueError: loaded state dict has a different number of parameter groups. Because when loading these groups won't exist yet !
To Reproduce
from pl_bolts.models.regression import LinearRegression
import pytorch_lightning as pl
from pl_bolts.datamodules import SklearnDataModule
from sklearn.datasets import load_boston
from pytorch_lightning.callbacks.finetuning import BaseFinetuning
from pytorch_lightning.callbacks import ModelCheckpoint

X, y = load_boston(return_X_y=True)
dm = SklearnDataModule(X, y)

class TmpLinearRegression(LinearRegression):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.to_freeze = nn.Linear(1,1)
        
    def configure_optimizers(self):
        return self.optimizer(self.linear.parameters(), lr=self.hparams.learning_rate)

class LRFinetuner(BaseFinetuning):
    def freeze_before_training(self, pl_module):
        self.freeze(modules=pl_module.to_freeze)

    def finetune_function(self, pl_module, current_epoch, optimizer, optimizer_idx):
        if current_epoch == 1:
            self.unfreeze_and_add_param_group(
                    modules=pl_module.to_freeze,
                    optimizer=optimizer,
                    initial_denom_lr=10,
                )
    

model = TmpLinearRegression(input_dim=13)
trainer = pl.Trainer(max_epochs=2, callbacks=[ModelCheckpoint(dirpath="./tmp", save_last=True), LRFinetuner()]) 
trainer.fit(model, train_dataloader=dm.train_dataloader(), val_dataloaders=dm.val_dataloader())

model = TmpLinearRegression(input_dim=13)
trainer = pl.Trainer(max_epochs=3, resume_from_checkpoint="tmp/last.ckpt") 
trainer.fit(model, train_dataloader=dm.train_dataloader(), val_dataloaders=dm.val_dataloader())
Bug:
/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py in restore_training_state(self, checkpoint)
    181         optimizer_states = checkpoint['optimizer_states']
    182         for optimizer, opt_state in zip(self.trainer.optimizers, optimizer_states):
--> 183             optimizer.load_state_dict(opt_state)
    184 
    185             # move optimizer to GPU 1 weight at a time

/usr/local/lib/python3.8/dist-packages/torch/optim/optimizer.py in load_state_dict(self, state_dict)
    117 
    118         if len(groups) != len(saved_groups):
--> 119             raise ValueError("loaded state dict has a different number of "
    120                              "parameter groups")
    121         param_lens = (len(g['params']) for g in groups)

ValueError: loaded state dict has a different number of parameter groups

Environment
pl version : 1.2.6