Thousands have gathered in New York and across the United States for ceremonies commemorating the 20th anniversary of the September 11 attacks.