NEW YORK — Former Fox News host Gretchen Carlson has settled sexual harrassment allegations against the network’s ousted chairman, Roger Ailes, and has received a $20 million payment and a public apology from its parent company, 21st Century Fox. Gretchen Carlson: “I want to thank all of the brave women who came forward to tell their own stories and the many people across the country who embraced and supported me.” Richard Drew/Associated Press The settlement brings a swift and expensive end to a claim that set in motion Ailes’s downfall from Fox, the cable news network he co-founded in 1996 and guided to dominance in the ensuing two decades. Carlson, the former host of “Fox and Friends,” sued Ailes on July 6, claiming that she was demoted and eventually let go from Fox after she refused his sexual advances.