Over half a billion pounds has been paid out by Scotland's NHS to victims of medical blunders, the Mail on Sunday can reveal.