Mexican president Enrique Pena Nieto has condemned Donald Trump's idea of building a wall between Mexico and the United States.