Brian L. Schwalb, the attorney general for the District of Columbia, asked a federal judge Friday to issue a restraining order against President Trump to block his takeover of the police department, saying it violates the home rule charter Congress granted to the city.