The mayor of London Sir Sadiq Khan has blocked a £50 million deal between the Metropolitan Police and controversial US technology company Palantir.