LONDON (Reuters) - Royal Bank of Scotland said it made a pretax profit of 1 billion pounds ($1.7 billion) in the second quarter, far better than analysts had expected, thanks to a turnaround in losses from bad loans, prompting it to release earnings a week early.