Sharpe, John, Sir, Solicitor -General