Government Formation and Endogenous Parties