Reorganizing and integrating CaptionRenderer

Each codec is now responsible for its own rendering rules, which makes
integrating new ones easier, although the interface that needs to be
implemented per codec is larger.