The emergence of norms from conflicts over just distributions