Endogenous thresholds and assurance networks in collective action