avformat/cache: remember EOF point if hit and use it to handle SEEK_END

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/cache: more informative error message

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/cache: Use the correct io handle in seeking

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/cache: Support user specified read-ahead for non seekable media

Fixes Ticket2406

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