Philadelphia, which has designated itself as a ‘‘sanctuary city,’’ received $57.5 million in Justice Department grants in fiscal year 2016  mostly to cover police expenses for the Democratic National Convention, which was held in the city.