The man accused in the apparent assassination attempt of Donald Trump wrote a note months earlier saying that he intended to kill the former president