lavc: introduce CODEC_CAP_PKT_TS

Codecs with internal parallelism need to set the pkt_pts/pkt_dts
by themselves.
wip: qsv decoders
wip:
qsv: Support Sandy Bridge
qsv: Fix behavior stream is decoded only half duration
qsv: Fix type of argument and return value
qsv: Flush cached frames when EOF
qsv: Add behavior when device busy
qsv: Add behavior when PicStruct is tripling and doubling
qsv: Change to dynamic surface allocate

Changed to dynamic surface allocate in get_surface(), because number of surfaces may be insufficient when it is a fixed value.
And reduced number of memcpy when output frame.
qsv: Change to dynamic timestamps allocate

Change to dynamic timestamps allocate, because the number of timestamps may be insufficient when it is a fixed value.
The number of timestamps depends on the number of packets required before outputting the frame, and the number to be reserved for frame reordering.
The number of packets which QSV decoder needs cannot be guessed before starting to output first frame, because it depends on the video stream.
The number to be reserved for frame reordering from H.264 specification is 32.
(Max B frame) * (Max picture per frame) = 16 * 2 = 32 (1 picture = 1 packet)
After first frame is output, the number of timestamps can be determined.

In the following cases, the value is changed.
1. If the number of timestamps is insufficient, it is increased until first frame is output.
2. Add 32 to the number of timestamps in use after first frame is output.
qsv: Support video parameter changed
qsv: Add AVOption async_depth
qsv: Add MPEG-2 video decoding support
qsvenc: qsv encoders
qsvenc: use av_log_get_level() in print_frametype()
qsvenc: change variables when logging FrameRate
qsvenc: move definition of variable in print_frametype()
qsvenc: locked=1 when allocation in get_bitstream()
qsvenc: change error check