R-matrix theory, formal Casimirs and the periodic Toda lattice