In reply to Emilysaladfingers:
As you realize, it ia a complex subject, and nobody knows all the answers yet, as there is much to be agreed between the eu and uk, and by Spain itself. The NIE is nothing to do with residence, but is a number needed by foreigners to carry out certain financial transactions, alhough it does appear on the residency card.
As already mentioned, the gov.uk site gives definitive answers, but only on what is so far definite. I recommend the British Embassy in Madrid facebook page for getting a better feel of how you might want to hedge your bets. It includes some useful Q&A videos.