How Ukip surge came despite referendum pledge and immigration fall