Mr. Cowan, 43, who is known as Mo, is a former partner in the politically connected law firm of Mintz Levin and will become Massachusetts’ first black senator since Edward Brooke, a Republican, held the seat from 1966 to 1978.