India's Supreme Court has dismissed attempts to prosecute PepsiCo over allegations that its drinks contained unsafe residues of pesticides.