Keith O'Brien, the former archbishop of St Andrews and Edinburgh, admitted to unspecified sexual misconduct and asked for the forgiveness of the Church and those he has offended.