Donald Trump says he is pulling out of a Republican presidential debate he had agreed to moderate in Iowa.