pthread_frame: Unreference hw_frames_ctx on per-thread codec contexts