Ukip has struck a deal with a Polish MEP whose far-right party leader casually uses racial slurs and questions the Holocaust following fears that its grouping in Europe would lose millions of pounds in taxpayers’ funds.