N- and p-type doping of transition-metal dichalcogenides by Ar plasma treatment and its application in CMOS