Harry Potter author JK Rowling has said she would prefer two years in jail over using a trans person’s correct pronouns.