Robert Bruce, Lord Kennet — Scottish advocate, legal scholar and judge