BUG-5280: move DataTreeCandidate serialization to its own class