lagarith: assign correct per-thread value to LagarithContext::avctx.

This fixes race conditions reported by tsan in fate-lagarith. The races
were because each thread's LagarithContext::avctx was set to the first
thread's AVCodecContext.
