The US president and the mayor of New York both spoke on the eve of America’s 250th anniversary, but their messages could not contrast more.