Scottish law firms to merge 'in one of the most significant deals in both firms' histories'