Cowen survives leadership ballot