demux: remove useless vid/aid/sid fields

Only demux_ts.c used sid in one case, replace that by reading the same
value from another location.
av_common: allow calling mp_codec_to_av_codec_id() with NULL

Helps reducing special cases.
sub, demux: identify subtitle types with the codec name

Get rid of the 1-char subtitle type field. Use sh_stream->codec instead
just like audio and video do. Use codec names as defined by libavcodec
for simplicity, even if they're somewhat verbose and annoying.

Note that ffmpeg might switch to "ass" as codec name for ASS, so we
don't bother with the current silly "ssa" name.
demux: get rid of sh_common_t

The only reason this existed was the parsing code. Even though it
could have been used for video, it's audio-only, so just move this
to sh_audio_t.
demux: remove some unused sh_video_t fields

Completely mysterious, and its values were never actually used.