People seem to be ignoring the most important feature of this referendum.
A vote for IN means "I want George Osborne to be the next prime minister" A vote for NO means "I want Boris Johnson to be the next prime minister".
The entire campaign so far has been focused on that one issue. The UK's place in Europe hasn't had a look in.
Really, I don't think anyone other than those rank and file Tory members would even think about that. You could have a situation where 75% of party members vote out but the rest of the country votes in which would see the 'in' vote win. The Tories will still vote for Boris. The outcome of the referendum will have little bearing on the Tory leadership vote which I believe will be decided by about 150,000 Tory members once the MPs have decided who will be in a two horse race..