Donald Trump has stuck his middle finger up and appeared to have sworn at a factory worker who heckled him.