Add ChapterSegmentEditionUID support

The branch is incomplete, but the idea is here. It's getting late and I figured I'd push up what I have for an initial review. I'll make comments on some of the lines that I'm hitting a wall on.