First-Principles Investigations on Magnetic and Optical Properties of Transition-Metal Dopants in β-SnSe