The queer injection into the young adult royal romance reflects a broader shift in what’s being published and read.