David Cameron could go down in history as the man who lost Europe, Scotland and Northern Ireland