Dan Cox wins Republican primary for Maryland governor