David Reid of Robertland — Scottish barrister, officer of arms and archivist