Electronic and optical properties of defective MoSe2 repaired by halogen atoms from first-principles study