Calculate line position for cues with their snapToLines flag set.

- This supports horizontal text only. It needs a few tweaks
to fully support vertical text.
- Added an options variable to processCues so that we can
pass a custom line height, or anything else to it. This
allows us to test on multiple platforms where the computed
line height might be different values. This is alright
because we're testing the algorithm, not what the computed
line height is.