First-principles study of nonmetal doped monolayer MoSe2 for tunable electronic and photocatalytic properties