I seem to recall Cameron saying, before his 'tough renegotiations', that of course the UK could survive and be strong outside the EU and he'd rule nothing out if he didn't get his way. Given all the dire warnings they've since issued about life (or death even, via WWIII) outside the EU and the minimal concessions he managed to get, it rather gives the impression that they were committed to staying in no matter what the outcome of those talks was. Their scaremongering has been such that you have to ask what the EU could have done (or refused to do) which could possibly have forced him decide that the plethora of terrible risks associated with leaving were acceptable because the alternative (i.e. staying in) was worse. It was never going to happen was it and all that stuff about tough negotiations to get what was best for the UK was wholly disingenuous.
If one argument is that it's vital for European security that we stay in, why would the EU not have every incentive to ensure that, if we did leave, whatever (if any) new measures and agreements were required were urgently put in place to avoid any undue damage to security. Are they really saying that's impossible, that they'd suddenly stop sharing information etc? Why would something so vital that they reckon is in everyone's interests be sacrificed unless it's a case of punishing the UK and, by their own admission, themselves in the process.