lavc: split slice and frame threading functions into separate files