The economics of netting in financial networks