Electoral Competition with Primaries and Quality Asymmetries