lavc/options: fix shallow copy context

avcodec_copy_context leaves shallow copy of string/binary/dict options.
Double free/accessing freed memory may occur.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
lavu/opt: document av_opt_copy function
lavu/opt: copy dict in av_opt_copy

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>