Tim Federle, a musical-theater veteran, has written two children's novels about a 13-year-old obsessed with the theater and offering support for young people discovering that they are gay.