avienc: sanitize variable naming in write_header()

Do not call an AVCodecContext 'stream', that is highly confusing.
Also, add a local variable for the current AVStream in the loop over all
streams.
