Swiss drugmaker Novartis has ended a contract with a firm linked to U.S. President Donald Trump's lawyer, Michael Cohen, saying it was now seen as a mistake.