During an event at the National Constitution Center to announce an initiative to provide legal representation to immigrants, the mayor departed from his prepared text to castigate the president for telling four Democratic congresswomen of color to “go back” to the “crime-infested places from which they came.”