Alex Cobb signs 4-year deal with the Orioles