MdeModulePkg: Refine the code in BootMaintenanceManagerUiLib