A homeless man has been arrested and charged over a plot to bomb the New York Stock Exchange.