oggenc: Move stream header writing to its own function.
oggenc: Ensure that all granules start counting from 0.

For files with chained streams, if they don't (from my tests):

1) VLC has issues playing the file (anything from delayed playback
   to segfaults).
2) Ogginfo reports incorrect durations.
3) GStreamer buffers infinitely.
oggenc: Rudimentary support for metadata updates.

Still needs to sync on theora keyframes before EOSing anything, or
it will break things.