According to the following article (May 2014) several scenarios are possible. Unfortunately as I read it, non of the possible outcomes paint a pretty picture.
http://eulawanalysis.blogspot.ch/2014/05/what-happens-to-british-expatriates-if.html
Is this anti EU a political exercise in retaining the power of the politicians? The latest figures (Eurostat) I could find indicate that there are more foreign nationals in the UK from outside the EU (3.9%) than from within the EU (3.8%) and overall 7.7%, much less than Switzerland (non-EU 23.2%) Spain 10.9%, Ireland 11.8%.