JK Rowling is among 150 public figures who have signed an open letter complaining about "a vogue for public shaming and ostracism".