Where two or more persons are co-sureties for the same debt or duty, either jointly or severally, and whether under the same or different contacts, and sureties, in the absence of any contract to the contrary, are liable, as between themselves, to pay each an equal share of the whole debt, or of that part of it which remains unpaid by the princi...