Experimental and theoretical study on the regioselective bis- and polyalkylation of 2-mercaptonicotinonitrile and 2-mercaptopyrimidine-5-carbonitrile derivatives