Save any threatening e-mails, texts, whatever, even verbal threats (write down time, date, content) and make sure you report them to your witness support officer who will take any action neccessary. What these former 'friends' did was very wrong, and they need to go down for it- what's more, with this attempted intimidation, they will go down harder, and if it is their friends who are also trying to scare you, they can be put down as well for various charges of witness intimidation, perversion of justice etc. It really is a serious crime, taken seriously by the police.
The ones doing this do however still sound more like idiots who have got scared because they went too far, and don't know how to get out of trouble- it is very unlikely anything will actually happen to you, especially if the police get involved. Something similar occurred to my sister, and the police investigating, and warning the offenders attempting to scare her similarly, put a very quick and permanent end to it. I suggest you do the same; this isn't some kind of incident to try and bury or ignore.
My friend was killed last year in a similar incident to that which you described, some guys attacking another for no apparent reason other than fun- and unluckily, he suffered injuries grievous enough to die soon after. The same could have happened even quite unintentionally in this case, and they need to be prevented from doing the same thing again.
Stand your ground and good luck with it all, for unprovoked assault like this these people deserve what they get. You must help in any way to ensure this, no matter how worried you may be. I wish you all the best.