huffyuvencdsp: move shared functions to a new lossless_videoencdsp context