ffplay: factorize frame queue operations

Create a generic frame and a frame queue struct to handle video picture queues
and subtitle picture queues with common code. Also add the possibility to queue
AVFrames, however at the moment we only use SDL_Overlay buffers for video and
AVSubtitles for subtitles.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: use frame queue to determine last used pos

Signed-off-by: Marton Balint <cus@passwd.hu>
Merge remote-tracking branch 'cus/stable'

* cus/stable:
  ffplay: use frame queue to determine last used pos
  ffplay: factorize frame queue operations

Merged-by: Michael Niedermayer <michaelni@gmx.at>