Spanning trees for the geometry and dynamics of compact polymers