flvenc: move metadata updates into a single function
flvenc: Send new metadata when AVSTREAM_EVENT_FLAG_METADATA_UPDATED is set.
oggenc: Assign serial numbers from a unique counter per context.

The spec states that the serial numbers must only be unique inside
a full bitstream. The counter approach keeps everything unique.
WIP on oggenc. It breaks everything around eos/bos