avcodec: add ff_lock/unlock_avcodec functions.

Will be used in future patches, together with the
variable that allows checking whether the lock is held.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
