LONDON (Reuters) - Royal Bank of Scotland on Friday said it posted a profit in the first half of 2017 following a 2 billion pound ($2.65 billion) loss in the same period last year amid hefty restructuring and legal costs.