avstring: add av_basename and av_dirname

Thread safe version of the common basename and dirname.
hlsenc: use the basename to generate the list entries

The segment path is desumed from the playlist path, recording a
relative path in the playlist while serving the file could lead
to misleading results.
hlsenc: check append_entry return value
hlsenc: use the segment filename in the playlist entry

Avoid calling av_get_frame_filename twice, once to generate the
segment filename and once to generate the playlist.
hlsenc: keep the playlist to the correct number of items

Consider the corner case with a list size larger than the wrap
number.
hlsenc: use the correct AV_TIME_BASE macro

recording_time is in AV_TIME_BASE units.
hlsenc: do not add timestamps in different timebases

start_time is in stream timebase units while end_time is
in AV_TIME_BASE ones.
hlsenc: make EXT-X-MEDIA-SEQUENCE always increase
hlsenc: make segment number unsigned

It will overflow if somebody keeps streaming for a time long enough.
snow: use VideoDSPContext

It was left over from the initial conversion.
mkv: support vp9 tag
nut: support vp9 tag
libvpx: support vp9

This feature is experimental use at your risk
libvpx: make vp8 and vp9 selectable

Support older libvpx versions.