US president played golf at his Turnberry resort as demonstrators took to the streets of Edinburgh.