Toward a coinsurance theory of group formation under risk