The special counsel effectively brought to a close the Justice Department efforts to hold Donald J. Trump accountable in the election and classified documents cases.