Captions

This includes the beginning of vtt.js work and supersedes #1656.