The former Federal Bureau of Investigation director’s death triggered a gloating response from the US president.