Selectivity and cooperativity in the binding of calcium ions by pectins