Exogenous and endogenous crashes as phase transitions in complex financial systems