Laboratory study on possible formation routes of nitriles and organosulfur compounds in the gas-phase chemistry of planetary atmospheres and cometary comae