President Donald Trump used a speech at the Justice Department to air a litany of grievances about the criminal investigations he faced, decrying his adversaries in often profane terms and casting himself as a victim of unfair and biased prosecutions.