The nation’s capital challenged President Trump’s takeover of its police department in court on Friday, hours after his administration stepped up its crackdown on policing by naming a federal official as the new emergency head of the department, with all the powers of a police chief.