It shall be lawful for every creditor of two or more debtors, joint or several, to compound with any and every one or more of his debtors for such sum as he may see fit, and to release him or them from all further liability to him for such indebtedness, without impairing his right to demand and collect the balance of such indebtedness from the other debtor or debtors thereof, and not so released; provided, that no such release shall impair the right of any debtor of such indebtedness, not so released, to have contribution from his codebtors, as is by law now secured to him.