All of Trump's questionable statements cannot be attributed to sarcasm and humor because his public platform is not designed for humor. As he is speaking to the electorate, what he says is very important as it is meant to earn him votes. Therefore, his statements cannot all be humorous as that would be incongruous with a political campaign.
Trump said this to insinuate to his voters and all who listen the "real" reason why ISIS exists, just like how he how he made the shocking revelation that if he were to lose the election was rigged. He's says these things to lay out his scapegoat in case he loses which is quite clever. His pundits, diehard supporters and Trump himself will use his very words to place the blame on something else but to what end is unknown.
No, Donald Trump's statements cannot all be attributed to sarcasm and humor. There is a good chance that Donald Trump is a racist. He is at least trying to use racist rhetoric disguised as nationalism to get the white middle class voters to support him over Hilary. He is trying to be devisive not funny.
A president's character should be characterized by honesty. It is not feasible nor correct to assume that all questionable statements made by Trump are attributed to sarcasm and humor. These are not excuses to make ridiculous claims. It puts into question the validity of any future statements that Trump makes.
Trump has the tendancy to use the defense of humor whenever he makes a serious statement that backfires. He may or may not have a sense of humor, but he is not a comedian. He needs to drop out of the race and let someone else run for President after all the threats he has made.